Examples of truncate()


Examples of org.h2.table.Table.truncate()

     * @param tableId the object id of the table
     */
    void redoTruncate(int tableId) {
        Index index = metaObjects.get(tableId);
        Table table = index.getTable();
        table.truncate(systemSession);
    }

    private void openMetaIndex() {
        CreateTableData data = new CreateTableData();
        ArrayList<Column> cols = data.columns;
View Full Code Here

Examples of org.hsqldb.types.DateTimeType.truncate()

                        throw Error.error(ErrorCode.X_42566, (String) data[1]);
                    }

                    return funcType == FUNC_ROUND
                           ? type.round(data[0], interval)
                           : type.truncate(data[0], interval);
                }
            }

            // fall through
            case FUNC_TRUNCATE : {
View Full Code Here

Examples of org.hsqldb.types.Type.truncate()

                        throw Error.error(ErrorCode.X_42566, (String) data[1]);
                    }

                    return funcType == FUNC_ROUND
                           ? type.round(data[0], interval)
                           : type.truncate(data[0], interval);
                }
            }

            // fall through
            case FUNC_TRUNCATE : {
View Full Code Here

Examples of org.jExigo.FixedDecimalNumber.truncate()

public void testTruncate()
{
  FixedDecimalNumber fda = new FixedDecimalNumber("1");
  try {
    fda.truncate(9)// too big but not an error
  } catch (Exception e) {
    fail(e.getMessage());
  }
  assertEquals("1",  fda.get());
 
View Full Code Here

Examples of org.lealone.dbobject.index.Index.truncate()

    @Override
    public void truncate(Session session) {
        lastModificationId = database.getNextModificationDataId();
        for (int i = indexes.size() - 1; i >= 0; i--) {
            Index index = indexes.get(i);
            index.truncate(session);
        }
        rowCount = 0;
        changesSinceAnalyze = 0;
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.transaction.TxLog.truncate()

            txLog.markAsCommitting( globalId );
            txLog.close();
            txLog = new TxLog( txFile() );
            assertEquals( 1,
                getRecordLists( txLog.getDanglingRecords() ).length );
            txLog.truncate();
            assertEquals( 0,
                getRecordLists( txLog.getDanglingRecords() ).length );
        }
        finally
        {
View Full Code Here

Examples of org.postgresql.largeobject.LargeObject.truncate()

                LargeObjectManager lom = getLargeObjectManager(conn);
                if (ob != null) {
                    LargeObject lo = lom.open(oid, LargeObjectManager.WRITE);
                    OutputStream os = lo.getOutputStream();
                    long size = copy((InputStream) ob, os);
                    lo.truncate((int) size);
                    lo.close();
                } else {
                    lom.delete(oid);
                    row.setInt(col, -1);
                }
View Full Code Here

Examples of org.springframework.data.cassandra.core.CassandraAdminTemplate.truncate()

    cassandraTemplate.createTable(true, CqlIdentifier.cqlId("users"), User.class, new HashMap<String, Object>());

    for (CassandraPersistentEntity<?> entity : cassandraTemplate.getConverter().getMappingContext()
        .getPersistentEntities()) {
      cassandraTemplate.truncate(entity.getTableName());
    }

    return cassandraTemplate;
  }
View Full Code Here

Examples of org.timepedia.chronoscope.client.util.date.ChronoDate.truncate()

   
  }

  public void testTruncate() {
    ChronoDate d = createTestDate(1492, 4, 21, 23, 56, 31, 555);
    d.truncate(TimeUnit.YEAR);
    assertEquals(1492, 0, 1, d);
   
    d = createTestDate(1492, 4, 21, 23, 56, 31, 555);
    d.truncate(TimeUnit.MONTH);
    assertEquals(1492, 4, 1, d);
View Full Code Here

Examples of org.timepedia.chronoscope.client.util.date.ChronoDate.truncate()

    ChronoDate d = createTestDate(1492, 4, 21, 23, 56, 31, 555);
    d.truncate(TimeUnit.YEAR);
    assertEquals(1492, 0, 1, d);
   
    d = createTestDate(1492, 4, 21, 23, 56, 31, 555);
    d.truncate(TimeUnit.MONTH);
    assertEquals(1492, 4, 1, d);

    d = createTestDate(1492, 4, 21, 23, 56, 31, 555);
    d.truncate(TimeUnit.DAY);
    assertEquals(1492, 4, 21, d);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.