Search in sources :

Example 1 with SequenceElement

use of ru.curs.celesta.score.SequenceElement in project celesta by CourseOrchestra.

the class FirebirdAdaptor method getCurrentIdent.

@Override
public int getCurrentIdent(Connection conn, BasicTable t) {
    IntegerColumn idColumn = t.getPrimaryKey().values().stream().filter(c -> c instanceof IntegerColumn).map(c -> (IntegerColumn) c).filter(ic -> ic.getSequence() != null).findFirst().get();
    final SequenceElement s = idColumn.getSequence();
    String curValueProcName = sequenceCurValueProcString(s.getGrain().getName(), s.getName());
    String sql = String.format("EXECUTE PROCEDURE %s(null)", curValueProcName);
    try (Statement stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery(sql)) {
        rs.next();
        return rs.getInt(1);
    } catch (SQLException e) {
        throw new CelestaException(e.getMessage());
    }
}
Also used : ParameterSetter(ru.curs.celesta.dbutils.stmt.ParameterSetter) AnsiQuotedIdentifierParser(ru.curs.celesta.score.validator.AnsiQuotedIdentifierParser) Connection(java.sql.Connection) DateTimeColumn(ru.curs.celesta.score.DateTimeColumn) CelestaException(ru.curs.celesta.CelestaException) ZonedDateTime(java.time.ZonedDateTime) LoggerFactory(org.slf4j.LoggerFactory) FKRule(ru.curs.celesta.score.FKRule) SequenceElement(ru.curs.celesta.score.SequenceElement) Grain(ru.curs.celesta.score.Grain) SqlUtils.executeUpdate(ru.curs.celesta.dbutils.jdbc.SqlUtils.executeUpdate) Matcher(java.util.regex.Matcher) DbIndexInfo(ru.curs.celesta.dbutils.meta.DbIndexInfo) DbColumnInfo(ru.curs.celesta.dbutils.meta.DbColumnInfo) StringColumn(ru.curs.celesta.score.StringColumn) ResultSet(java.sql.ResultSet) Map(java.util.Map) DataGrainElement(ru.curs.celesta.score.DataGrainElement) DbPkInfo(ru.curs.celesta.dbutils.meta.DbPkInfo) FromClause(ru.curs.celesta.dbutils.query.FromClause) DBType(ru.curs.celesta.DBType) Set(java.util.Set) SchemalessFunctions(ru.curs.celesta.dbutils.adaptors.function.SchemalessFunctions) BooleanColumn(ru.curs.celesta.score.BooleanColumn) ConnectionPool(ru.curs.celesta.ConnectionPool) PreparedStatement(java.sql.PreparedStatement) Column(ru.curs.celesta.score.Column) ZoneId(java.time.ZoneId) List(java.util.List) BasicTable(ru.curs.celesta.score.BasicTable) Pattern(java.util.regex.Pattern) IntegerColumn(ru.curs.celesta.score.IntegerColumn) TableElement(ru.curs.celesta.score.TableElement) DecimalColumn(ru.curs.celesta.score.DecimalColumn) DatabaseMetaData(java.sql.DatabaseMetaData) HashMap(java.util.HashMap) DbFkInfo(ru.curs.celesta.dbutils.meta.DbFkInfo) TriggerQuery(ru.curs.celesta.event.TriggerQuery) ArrayList(java.util.ArrayList) SQLException(java.sql.SQLException) FireBirdConstants(ru.curs.celesta.dbutils.adaptors.constants.FireBirdConstants) SqlUtils(ru.curs.celesta.dbutils.jdbc.SqlUtils) DbSequenceInfo(ru.curs.celesta.dbutils.meta.DbSequenceInfo) BinaryColumn(ru.curs.celesta.score.BinaryColumn) DdlGenerator(ru.curs.celesta.dbutils.adaptors.ddl.DdlGenerator) LinkedHashSet(java.util.LinkedHashSet) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) DdlConsumer(ru.curs.celesta.dbutils.adaptors.ddl.DdlConsumer) Statement(java.sql.Statement) NamedElement(ru.curs.celesta.score.NamedElement) FirebirdDdlGenerator(ru.curs.celesta.dbutils.adaptors.ddl.FirebirdDdlGenerator) IntegerColumn(ru.curs.celesta.score.IntegerColumn) SQLException(java.sql.SQLException) PreparedStatement(java.sql.PreparedStatement) Statement(java.sql.Statement) SequenceElement(ru.curs.celesta.score.SequenceElement) ResultSet(java.sql.ResultSet) CelestaException(ru.curs.celesta.CelestaException)

Example 2 with SequenceElement

use of ru.curs.celesta.score.SequenceElement in project celesta by CourseOrchestra.

the class CursorGenerator method buildConstructors.

private static List<MethodSpec> buildConstructors(GrainElement ge, TypeName columnsClassType) {
    List<MethodSpec> results = new ArrayList<>();
    ParameterSpec contextParam = ParameterSpec.builder(CallContext.class, "context").build();
    ParameterSpec fieldsParam = ParameterSpec.builder(ParameterizedTypeName.get(Set.class, String.class), "fields").build();
    ParameterSpec columnsParam = ParameterSpec.builder(ArrayTypeName.of(ParameterizedTypeName.get(ClassName.get(ColumnMeta.class), WildcardTypeName.subtypeOf(Object.class))), "columns").build();
    ParameterSpec parametersParam = ParameterSpec.builder(ParameterizedTypeName.get(Map.class, String.class, Object.class), "parameters").build();
    Supplier<MethodSpec.Builder> msp = () -> MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC).addParameter(contextParam);
    // Common constructor
    MethodSpec.Builder builder = msp.get();
    if (ge instanceof ParameterizedView) {
        builder.addParameter(parametersParam);
        builder.addStatement("super(context, parameters)");
    } else {
        builder.addStatement("super(context)");
    }
    results.add(builder.build());
    if (ge instanceof SequenceElement) {
        return results;
    }
    // Constructor with columns limitation
    builder = msp.get();
    if (ge instanceof ParameterizedView) {
        builder.addParameter(parametersParam);
        builder.addParameter(columnsParam).varargs();
        builder.addStatement("super(context, parameters, columns)");
    } else {
        builder.addParameter(columnsParam).varargs();
        builder.addStatement("super(context, columns)");
    }
    results.add(builder.build());
    // Deprecated constructor with fields limitation
    builder = msp.get();
    if (ge instanceof ParameterizedView) {
        builder.addParameter(fieldsParam);
        builder.addParameter(parametersParam);
        builder.addStatement("super(context, fields, parameters)");
    } else {
        builder.addParameter(fieldsParam);
        builder.addStatement("super(context, fields)");
    }
    results.add(builder.addAnnotation(Deprecated.class).build());
    // ParameterizedView constructors
    if (ge instanceof ParameterizedView) {
        ParameterizedView pv = (ParameterizedView) ge;
        builder = msp.get();
        for (Parameter parameter : pv.getParameters().values()) {
            builder.addParameter(ParameterSpec.builder(parameter.getJavaClass(), parameter.getName()).build());
        }
        String spec = "super (context, paramsMap(" + pv.getParameters().values().stream().map(c -> "$N").collect(Collectors.joining(", ")) + "))";
        builder.addStatement(spec, pv.getParameters().keySet().toArray());
        results.add(builder.build());
        builder = msp.get();
        for (Parameter parameter : pv.getParameters().values()) {
            builder.addParameter(ParameterSpec.builder(parameter.getJavaClass(), parameter.getName()).build());
        }
        builder.addParameter(columnsParam).varargs();
        spec = "super (context, paramsMap(" + pv.getParameters().values().stream().map(c -> "$N").collect(Collectors.joining(", ")) + "), columns)";
        builder.addStatement(spec, pv.getParameters().keySet().toArray());
        results.add(builder.build());
        results.add(getParameterizedViewTypedConstructorHelper(pv));
    }
    return results;
}
Also used : BasicCursor(ru.curs.celesta.dbutils.BasicCursor) Arrays(java.util.Arrays) Modifier(javax.lang.model.element.Modifier) CelestaException(ru.curs.celesta.CelestaException) ZonedDateTime(java.time.ZonedDateTime) ClassName(com.squareup.javapoet.ClassName) SequenceElement(ru.curs.celesta.score.SequenceElement) Grain(ru.curs.celesta.score.Grain) Parameter(ru.curs.celesta.score.Parameter) ColumnMeta(ru.curs.celesta.score.ColumnMeta) Generated(javax.annotation.Generated) StringColumn(ru.curs.celesta.score.StringColumn) ResultSet(java.sql.ResultSet) Map(java.util.Map) ICelesta(ru.curs.celesta.ICelesta) ZoneOffset(java.time.ZoneOffset) DataGrainElement(ru.curs.celesta.score.DataGrainElement) CelestaGenerated(ru.curs.celesta.dbutils.CelestaGenerated) ParameterSpec(com.squareup.javapoet.ParameterSpec) CallContext(ru.curs.celesta.CallContext) TimeZone(java.util.TimeZone) Timestamp(java.sql.Timestamp) Collection(java.util.Collection) Set(java.util.Set) Column(ru.curs.celesta.score.Column) Collectors(java.util.stream.Collectors) JavaFile(com.squareup.javapoet.JavaFile) Objects(java.util.Objects) List(java.util.List) ViewCursor(ru.curs.celesta.dbutils.ViewCursor) TriggerType(ru.curs.celesta.event.TriggerType) BasicTable(ru.curs.celesta.score.BasicTable) GrainElement(ru.curs.celesta.score.GrainElement) BasicDataAccessor(ru.curs.celesta.dbutils.BasicDataAccessor) TypeName(com.squareup.javapoet.TypeName) Optional(java.util.Optional) IntegerColumn(ru.curs.celesta.score.IntegerColumn) MaterializedViewCursor(ru.curs.celesta.dbutils.MaterializedViewCursor) ZonedDateTimeColumn(ru.curs.celesta.score.ZonedDateTimeColumn) FieldSpec(com.squareup.javapoet.FieldSpec) TableElement(ru.curs.celesta.score.TableElement) LocalDateTime(java.time.LocalDateTime) WildcardTypeName(com.squareup.javapoet.WildcardTypeName) Cursor(ru.curs.celesta.dbutils.Cursor) HashMap(java.util.HashMap) View(ru.curs.celesta.score.View) ReadOnlyTable(ru.curs.celesta.score.ReadOnlyTable) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) SQLException(java.sql.SQLException) Calendar(java.util.Calendar) Sequence(ru.curs.celesta.dbutils.Sequence) BinaryColumn(ru.curs.celesta.score.BinaryColumn) ParameterizedView(ru.curs.celesta.score.ParameterizedView) CodeBlock(com.squareup.javapoet.CodeBlock) LinkedHashSet(java.util.LinkedHashSet) Iterator(java.util.Iterator) MethodSpec(com.squareup.javapoet.MethodSpec) ParameterizedTypeName(com.squareup.javapoet.ParameterizedTypeName) IOException(java.io.IOException) CursorIterator(ru.curs.celesta.dbutils.CursorIterator) TypeSpec(com.squareup.javapoet.TypeSpec) ParameterizedViewCursor(ru.curs.celesta.dbutils.ParameterizedViewCursor) MaterializedView(ru.curs.celesta.score.MaterializedView) Table(ru.curs.celesta.score.Table) File(java.io.File) Consumer(java.util.function.Consumer) AnnotationSpec(com.squareup.javapoet.AnnotationSpec) VersionedElement(ru.curs.celesta.score.VersionedElement) DateTimeFormatter(java.time.format.DateTimeFormatter) NamedElement(ru.curs.celesta.score.NamedElement) FileResource(ru.curs.celesta.score.io.FileResource) ReadOnlyTableCursor(ru.curs.celesta.dbutils.ReadOnlyTableCursor) Collections(java.util.Collections) ArrayTypeName(com.squareup.javapoet.ArrayTypeName) MethodSpec(com.squareup.javapoet.MethodSpec) ParameterSpec(com.squareup.javapoet.ParameterSpec) SequenceElement(ru.curs.celesta.score.SequenceElement) ArrayList(java.util.ArrayList) CallContext(ru.curs.celesta.CallContext) Parameter(ru.curs.celesta.score.Parameter) ParameterizedView(ru.curs.celesta.score.ParameterizedView)

Example 3 with SequenceElement

use of ru.curs.celesta.score.SequenceElement in project celesta by CourseOrchestra.

the class AbstractAdaptorTest method testCreateAndAlterSequence.

@Test
void testCreateAndAlterSequence() throws Exception {
    Grain g = score.getGrain(GRAIN_NAME);
    SequenceElement sequence = g.getElement("testSequence", SequenceElement.class);
    if (dba.sequenceExists(conn, g.getName(), sequence.getName()))
        dba.dropSequence(conn, sequence);
    // Sequence not exists
    assertFalse(dba.sequenceExists(conn, g.getName(), sequence.getName()));
    dba.createSequence(conn, sequence);
    assertTrue(dba.sequenceExists(conn, g.getName(), sequence.getName()));
    DbSequenceInfo sequenceInfo = dba.getSequenceInfo(conn, sequence);
    assertFalse(sequenceInfo.reflects(sequence));
    assertAll(() -> assertEquals(1L, sequenceInfo.getIncrementBy()), () -> assertEquals(5L, sequenceInfo.getMinValue()), () -> assertEquals(Long.MAX_VALUE, sequenceInfo.getMaxValue()), () -> assertEquals(false, sequenceInfo.isCycle()));
    assertEquals(5, dba.nextSequenceValue(conn, sequence));
    assertEquals(6, dba.nextSequenceValue(conn, sequence));
    // Modifying of increment by
    sequence.getArguments().put(SequenceElement.Argument.INCREMENT_BY, 2L);
    assertTrue(sequenceInfo.reflects(sequence));
    dba.alterSequence(conn, sequence);
    DbSequenceInfo sequenceInfo2 = dba.getSequenceInfo(conn, sequence);
    assertFalse(sequenceInfo2.reflects(sequence));
    assertAll(() -> assertEquals(2L, sequenceInfo2.getIncrementBy()), () -> assertEquals(5L, sequenceInfo2.getMinValue()), () -> assertEquals(Long.MAX_VALUE, sequenceInfo2.getMaxValue()), () -> assertEquals(false, sequenceInfo2.isCycle()));
    // Altering to short cycle
    sequence.getArguments().put(SequenceElement.Argument.INCREMENT_BY, 1L);
    sequence.getArguments().put(SequenceElement.Argument.MINVALUE, 5L);
    sequence.getArguments().put(SequenceElement.Argument.MAXVALUE, 7L);
    sequence.getArguments().put(SequenceElement.Argument.CYCLE, true);
    assertTrue(sequenceInfo.reflects(sequence));
    dba.alterSequence(conn, sequence);
    DbSequenceInfo sequenceInfo3 = dba.getSequenceInfo(conn, sequence);
    assertFalse(sequenceInfo3.reflects(sequence));
    assertAll(() -> assertEquals(1L, sequenceInfo3.getIncrementBy()), () -> assertEquals(5L, sequenceInfo3.getMinValue()), () -> assertEquals(7L, sequenceInfo3.getMaxValue()), () -> assertEquals(true, sequenceInfo3.isCycle()));
    dba.dropSequence(conn, sequence);
}
Also used : DbSequenceInfo(ru.curs.celesta.dbutils.meta.DbSequenceInfo) Grain(ru.curs.celesta.score.Grain) SequenceElement(ru.curs.celesta.score.SequenceElement) Test(org.junit.jupiter.api.Test)

Example 4 with SequenceElement

use of ru.curs.celesta.score.SequenceElement in project celesta by CourseOrchestra.

the class AbstractAdaptorTest method testColumnUpdateWithDefaultSequence.

@Test
void testColumnUpdateWithDefaultSequence() throws Exception {
    Grain g = score.getGrain(GRAIN_NAME);
    SequenceElement sequence = g.getElement("testSequence", SequenceElement.class);
    SequenceElement sequence2 = g.getElement("testSequence2", SequenceElement.class);
    BasicTable table = g.getElement("tableForTestSequence", BasicTable.class);
    try {
        if (dba.tableExists(conn, g.getName(), table.getName()))
            dba.dropTable(conn, table);
        if (dba.sequenceExists(conn, g.getName(), sequence.getName()))
            dba.dropSequence(conn, sequence);
        if (dba.sequenceExists(conn, g.getName(), sequence2.getName()))
            dba.dropSequence(conn, sequence2);
        dba.createSequence(conn, sequence);
        dba.createSequence(conn, sequence2);
        dba.createTable(conn, table);
        IntegerColumn id = (IntegerColumn) table.getColumn("id");
        final DbColumnInfo idInfo1 = dba.getColumnInfo(conn, table.getColumn("id"));
        assertAll(() -> assertTrue(idInfo1.reflects(id)), () -> assertEquals(IntegerColumn.class, idInfo1.getType()), () -> assertEquals("NEXTVAL(testSequence)".toLowerCase(), idInfo1.getDefaultValue().toLowerCase()));
        id.setNullableAndDefault(false, "NEXTVAL(" + sequence2.getName() + ")");
        assertFalse(idInfo1.reflects(id));
        dba.updateColumn(conn, id, idInfo1);
        final DbColumnInfo idInfo2 = dba.getColumnInfo(conn, table.getColumn("id"));
        assertAll(() -> assertTrue(idInfo2.reflects(id)), () -> assertEquals(IntegerColumn.class, idInfo2.getType()), () -> assertEquals("NEXTVAL(testSequence2)".toLowerCase(), idInfo2.getDefaultValue().toLowerCase()));
        id.setNullableAndDefault(false, "5");
        assertFalse(idInfo2.reflects(id));
        dba.updateColumn(conn, id, idInfo2);
        final DbColumnInfo idInfo3 = dba.getColumnInfo(conn, table.getColumn("id"));
        assertAll(() -> assertTrue(idInfo3.reflects(id)), () -> assertEquals(IntegerColumn.class, idInfo3.getType()), () -> assertEquals("5".toLowerCase(), idInfo3.getDefaultValue().toLowerCase()));
        id.setNullableAndDefault(false, "NEXTVAL(" + sequence.getName() + ")");
        assertFalse(idInfo3.reflects(id));
        dba.updateColumn(conn, id, idInfo3);
        final DbColumnInfo idInfo4 = dba.getColumnInfo(conn, table.getColumn("id"));
        assertAll(() -> assertTrue(idInfo4.reflects(id)), () -> assertEquals(IntegerColumn.class, idInfo4.getType()), () -> assertEquals("NEXTVAL(testSequence)".toLowerCase(), idInfo4.getDefaultValue().toLowerCase()));
        IntegerColumn numb = (IntegerColumn) table.getColumn("numb");
        final DbColumnInfo numbInfo1 = dba.getColumnInfo(conn, numb);
        assertAll(() -> assertTrue(numbInfo1.reflects(numb)), () -> assertEquals(IntegerColumn.class, numbInfo1.getType()), () -> assertTrue(numbInfo1.getDefaultValue().isEmpty()));
        numb.setNullableAndDefault(false, "NEXTVAL(" + sequence2.getName() + ")");
        assertFalse(numbInfo1.reflects(numb));
        dba.updateColumn(conn, numb, numbInfo1);
        final DbColumnInfo numbInfo2 = dba.getColumnInfo(conn, numb);
        assertAll(() -> assertTrue(numbInfo2.reflects(numb)), () -> assertEquals(IntegerColumn.class, numbInfo2.getType()), () -> assertEquals("NEXTVAL(testSequence2)".toLowerCase(), numbInfo2.getDefaultValue().toLowerCase()));
    } finally {
        if (dba.tableExists(conn, g.getName(), table.getName()))
            dba.dropTable(conn, table);
        if (dba.sequenceExists(conn, g.getName(), sequence.getName()))
            dba.dropSequence(conn, sequence);
        if (dba.sequenceExists(conn, g.getName(), sequence2.getName()))
            dba.dropSequence(conn, sequence2);
    }
}
Also used : IntegerColumn(ru.curs.celesta.score.IntegerColumn) Grain(ru.curs.celesta.score.Grain) SequenceElement(ru.curs.celesta.score.SequenceElement) DbColumnInfo(ru.curs.celesta.dbutils.meta.DbColumnInfo) BasicTable(ru.curs.celesta.score.BasicTable) Test(org.junit.jupiter.api.Test)

Example 5 with SequenceElement

use of ru.curs.celesta.score.SequenceElement in project celesta by CourseOrchestra.

the class AbstractAdaptorTest method testInitDataForMaterializedView.

@Test
public void testInitDataForMaterializedView() throws Exception {
    Grain g = score.getGrain(GRAIN_NAME);
    SequenceElement ts = g.getElement("tableForInitMvData_id", SequenceElement.class);
    BasicTable t = g.getElement("tableForInitMvData", BasicTable.class);
    MaterializedView mv = g.getElement("mViewForInit", MaterializedView.class);
    try {
        // Могли остаться от незавершившегося теста
        try {
            dba.dropTable(conn, t);
        } catch (CelestaException e) {
            conn.rollback();
        }
        try {
            dba.dropSequence(conn, ts);
        } catch (CelestaException e) {
            conn.rollback();
        }
        try {
            dba.dropTable(conn, mv);
        } catch (CelestaException e) {
            conn.rollback();
        }
        dba.createSequence(conn, ts);
        dba.createTable(conn, t);
        dba.createTable(conn, mv);
        boolean[] nullsMask = { true, false, false, false };
        LocalDateTime d = LocalDateTime.now();
        Object[] rowData = { null, "A", 5, Date.from(d.toInstant(ZoneOffset.UTC)) };
        List<ParameterSetter> program = new ArrayList<>();
        try (PreparedStatement pstmt = dba.getInsertRecordStatement(conn, t, nullsMask, program)) {
            int i = 1;
            for (ParameterSetter ps : program) {
                ps.execute(pstmt, i++, rowData, 0);
            }
            pstmt.execute();
            d = d.plusSeconds(1);
            Object[] rowData2 = { null, "A", 5, Date.from(d.toInstant(ZoneOffset.UTC)) };
            i = 1;
            for (ParameterSetter ps : program) {
                ps.execute(pstmt, i++, rowData2, 0);
            }
            pstmt.execute();
            assertEquals(0, getCount(conn, mv));
            Object[] secondRowData = { null, "B", 3, d };
            i = 1;
            for (ParameterSetter ps : program) {
                ps.execute(pstmt, i++, secondRowData, 0);
            }
            pstmt.execute();
            pstmt.close();
            assertEquals(0, getCount(conn, mv));
            dba.initDataForMaterializedView(conn, mv);
            assertEquals(2, getCount(conn, mv));
            dba.initDataForMaterializedView(conn, mv);
            assertEquals(2, getCount(conn, mv));
        }
        FromClause from = new FromClause();
        from.setGe(mv);
        from.setExpression(dba.tableString(mv.getGrain().getName(), mv.getName()));
        try (PreparedStatement pstmt = dba.getRecordSetStatement(conn, from, "", "\"var\"", 0, 0, Collections.emptySet())) {
            ResultSet rs = pstmt.executeQuery();
            rs.next();
            assertEquals("A", rs.getString("var"));
            assertEquals(10, rs.getInt("s"));
            assertEquals(2, rs.getInt(MaterializedView.SURROGATE_COUNT));
            rs.next();
            assertEquals("B", rs.getString("var"));
            assertEquals(3, rs.getInt("s"));
            assertEquals(1, rs.getInt(MaterializedView.SURROGATE_COUNT));
        }
    } catch (Exception e) {
        throw e;
    } finally {
        if (dba.tableExists(conn, g.getName(), mv.getName())) {
            dba.dropTable(conn, mv);
        }
        if (dba.tableExists(conn, g.getName(), t.getName())) {
            dba.dropTable(conn, t);
        }
        if (dba.sequenceExists(conn, g.getName(), ts.getName())) {
            dba.dropSequence(conn, ts);
        }
    }
}
Also used : LocalDateTime(java.time.LocalDateTime) Grain(ru.curs.celesta.score.Grain) SequenceElement(ru.curs.celesta.score.SequenceElement) ArrayList(java.util.ArrayList) PreparedStatement(java.sql.PreparedStatement) ParameterSetter(ru.curs.celesta.dbutils.stmt.ParameterSetter) CelestaException(ru.curs.celesta.CelestaException) CelestaException(ru.curs.celesta.CelestaException) SQLException(java.sql.SQLException) IOException(java.io.IOException) ParseException(ru.curs.celesta.score.ParseException) BasicTable(ru.curs.celesta.score.BasicTable) FromClause(ru.curs.celesta.dbutils.query.FromClause) ResultSet(java.sql.ResultSet) MaterializedView(ru.curs.celesta.score.MaterializedView) Test(org.junit.jupiter.api.Test)

Aggregations

SequenceElement (ru.curs.celesta.score.SequenceElement)11 Grain (ru.curs.celesta.score.Grain)9 BasicTable (ru.curs.celesta.score.BasicTable)8 Test (org.junit.jupiter.api.Test)7 CelestaException (ru.curs.celesta.CelestaException)7 SQLException (java.sql.SQLException)6 IOException (java.io.IOException)5 ResultSet (java.sql.ResultSet)5 ArrayList (java.util.ArrayList)5 PreparedStatement (java.sql.PreparedStatement)4 DbColumnInfo (ru.curs.celesta.dbutils.meta.DbColumnInfo)4 ParseException (ru.curs.celesta.score.ParseException)4 FromClause (ru.curs.celesta.dbutils.query.FromClause)3 ParameterSetter (ru.curs.celesta.dbutils.stmt.ParameterSetter)3 IntegerColumn (ru.curs.celesta.score.IntegerColumn)3 MaterializedView (ru.curs.celesta.score.MaterializedView)3 TableElement (ru.curs.celesta.score.TableElement)3 Statement (java.sql.Statement)2 LocalDateTime (java.time.LocalDateTime)2 ZonedDateTime (java.time.ZonedDateTime)2