polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [19/19] polygene-java git commit: Bring in Stanislav's sql-generator from GutHub, after his consent in https://lists.apache.org/thread.html/797352ce2ad7aa7b755720a98f545a176e6050e35f56db113ba115fb@%3Cdev.polygene.apache.org%3E
Date Sat, 15 Apr 2017 08:26:10 GMT
Bring in Stanislav's sql-generator from GutHub, after his consent in https://lists.apache.org/thread.html/797352ce2ad7aa7b755720a98f545a176e6050e35f56db113ba115fb@%3Cdev.polygene.apache.org%3E

Signed-off-by: niclas <niclas@spicter.com>


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/a36086b6
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/a36086b6
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/a36086b6

Branch: refs/heads/develop
Commit: a36086b600a76ee1252ae3a7e857739ed4c2ff09
Parents: d64c585
Author: Stanislav Muhametsin <stas.dev+qi4j@gmail.com>
Authored: Sat Apr 15 16:25:22 2017 +0800
Committer: niclas <niclas@spicter.com>
Committed: Sat Apr 15 16:25:23 2017 +0800

----------------------------------------------------------------------
 .../instantiation/ValueInstantiationTests.java  |   6 +-
 .../test/cache/AbstractCachePoolTest.java       |  14 +-
 dependencies.gradle                             |   3 -
 extensions/indexing-sql/build.gradle            |   5 +-
 .../AbstractSQLIndexQueryAssembler.java         |   4 +-
 .../assembly/PostgreSQLIndexQueryAssembler.java |   6 +-
 .../support/common/GenericDatabaseExplorer.java |  42 +-
 .../postgresql/PostgreSQLAppStartup.java        |  14 +-
 .../postgresql/PostgreSQLIndexExporter.java     |   2 +-
 .../support/postgresql/PostgreSQLIndexing.java  |  18 +-
 .../support/postgresql/PostgreSQLQuerying.java  |   6 +-
 .../support/skeletons/AbstractSQLIndexing.java  |  32 +-
 .../support/skeletons/AbstractSQLQuerying.java  | 137 ++---
 .../support/skeletons/AbstractSQLStartup.java   |  37 +-
 .../postgresql/PostgreSQLDBIntegrityTest.java   |  13 +-
 .../library/sql/generator/Typeable.java         |  54 ++
 .../grammar/booleans/BetweenPredicate.java      |  46 ++
 .../grammar/booleans/BinaryPredicate.java       |  46 ++
 .../grammar/booleans/BooleanExpression.java     |  86 +++
 .../generator/grammar/booleans/BooleanTest.java |  94 +++
 .../booleans/ComposedBooleanExpression.java     |  31 +
 .../generator/grammar/booleans/Conjunction.java |  44 ++
 .../generator/grammar/booleans/Disjunction.java |  43 ++
 .../grammar/booleans/EqualsPredicate.java       |  31 +
 .../grammar/booleans/ExistsPredicate.java       |  36 ++
 .../booleans/GreaterOrEqualPredicate.java       |  32 +
 .../grammar/booleans/GreaterThanPredicate.java  |  31 +
 .../generator/grammar/booleans/InPredicate.java |  31 +
 .../grammar/booleans/IsNotNullPredicate.java    |  31 +
 .../grammar/booleans/IsNullPredicate.java       |  31 +
 .../grammar/booleans/LessOrEqualPredicate.java  |  32 +
 .../grammar/booleans/LessThanPredicate.java     |  31 +
 .../grammar/booleans/LikePredicate.java         |  32 +
 .../grammar/booleans/MultiPredicate.java        |  47 ++
 .../generator/grammar/booleans/Negation.java    |  37 ++
 .../grammar/booleans/NotBetweenPredicate.java   |  45 ++
 .../grammar/booleans/NotEqualsPredicate.java    |  31 +
 .../grammar/booleans/NotInPredicate.java        |  32 +
 .../grammar/booleans/NotLikePredicate.java      |  32 +
 .../grammar/booleans/NotRegexpPredicate.java    |  32 +
 .../generator/grammar/booleans/Predicate.java   |  57 ++
 .../grammar/booleans/RegexpPredicate.java       |  31 +
 .../grammar/booleans/UnaryPredicate.java        |  39 ++
 .../grammar/booleans/UniquePredicate.java       |  37 ++
 .../grammar/booleans/package-info.java          |  23 +
 .../grammar/builders/AbstractBuilder.java       |  36 ++
 .../builders/booleans/BooleanBuilder.java       |  65 ++
 .../grammar/builders/booleans/InBuilder.java    |  37 ++
 .../grammar/builders/booleans/package-info.java |  23 +
 .../definition/ForeignKeyConstraintBuilder.java | 133 ++++
 .../definition/SchemaDefinitionBuilder.java     |  81 +++
 .../definition/TableDefinitionBuilder.java      | 104 ++++
 .../definition/TableElementListBuilder.java     |  50 ++
 .../definition/UniqueConstraintBuilder.java     |  66 ++
 .../definition/ViewDefinitionBuilder.java       | 117 ++++
 .../builders/definition/package-info.java       |  23 +
 .../ColumnSourceByValuesBuilder.java            |  64 ++
 .../modification/DeleteBySearchBuilder.java     |  60 ++
 .../modification/InsertStatementBuilder.java    |  69 +++
 .../modification/UpdateBySearchBuilder.java     |  70 +++
 .../builders/modification/package-info.java     |  23 +
 .../pgsql/PgSQLInsertStatementBuilder.java      |  41 ++
 .../modification/pgsql/package-info.java        |  24 +
 .../grammar/builders/package-info.java          |  23 +
 .../builders/query/AbstractQueryBuilder.java    |  82 +++
 .../grammar/builders/query/ColumnsBuilder.java  |  87 +++
 .../grammar/builders/query/FromBuilder.java     |  54 ++
 .../grammar/builders/query/GroupByBuilder.java  |  52 ++
 .../grammar/builders/query/OrderByBuilder.java  |  52 ++
 .../grammar/builders/query/QueryBuilder.java    | 214 +++++++
 .../query/QuerySpecificationBuilder.java        | 140 +++++
 .../builders/query/SimpleQueryBuilder.java      | 127 ++++
 .../builders/query/TableReferenceBuilder.java   |  76 +++
 .../grammar/builders/query/package-info.java    |  23 +
 .../grammar/common/ColumnNameList.java          |  38 ++
 .../grammar/common/NonBooleanExpression.java    |  31 +
 .../generator/grammar/common/SQLConstants.java  |  82 +++
 .../generator/grammar/common/SQLFunctions.java  |  43 ++
 .../generator/grammar/common/SQLStatement.java  |  39 ++
 .../common/SchemaDefinitionStatement.java       |  34 +
 .../common/SchemaManipulationStatement.java     |  29 +
 .../grammar/common/SchemaStatement.java         |  31 +
 .../generator/grammar/common/SetQuantifier.java |  39 ++
 .../sql/generator/grammar/common/TableName.java |  40 ++
 .../grammar/common/TableNameDirect.java         |  37 ++
 .../grammar/common/TableNameFunction.java       |  38 ++
 .../grammar/common/ValueExpression.java         |  34 +
 .../grammar/common/datatypes/BigInt.java        |  31 +
 .../grammar/common/datatypes/Decimal.java       |  52 ++
 .../common/datatypes/DoublePrecision.java       |  31 +
 .../common/datatypes/IntervalDataType.java      |  40 ++
 .../grammar/common/datatypes/Numeric.java       |  52 ++
 .../datatypes/ParametrizableDataType.java       |  30 +
 .../grammar/common/datatypes/Real.java          |  31 +
 .../grammar/common/datatypes/SQLBoolean.java    |  31 +
 .../grammar/common/datatypes/SQLChar.java       |  46 ++
 .../grammar/common/datatypes/SQLDataType.java   |  33 +
 .../grammar/common/datatypes/SQLDate.java       |  31 +
 .../grammar/common/datatypes/SQLFloat.java      |  37 ++
 .../grammar/common/datatypes/SQLInteger.java    |  31 +
 .../grammar/common/datatypes/SQLInterval.java   |  61 ++
 .../grammar/common/datatypes/SQLTime.java       |  44 ++
 .../grammar/common/datatypes/SQLTimeStamp.java  |  42 ++
 .../grammar/common/datatypes/SmallInt.java      |  31 +
 .../common/datatypes/UserDefinedType.java       |  36 ++
 .../grammar/common/datatypes/package-info.java  |  23 +
 .../grammar/common/datatypes/pgsql/Text.java    |  33 +
 .../generator/grammar/common/package-info.java  |  23 +
 .../definition/schema/SchemaDefinition.java     |  54 ++
 .../definition/schema/SchemaElement.java        |  34 +
 .../grammar/definition/schema/package-info.java |  23 +
 .../definition/table/AutoGenerationPolicy.java  |  52 ++
 .../definition/table/CheckConstraint.java       |  34 +
 .../definition/table/ColumnDefinition.java      |  70 +++
 .../table/ConstraintCharacteristics.java        |  44 ++
 .../definition/table/ForeignKeyConstraint.java  |  79 +++
 .../grammar/definition/table/LikeClause.java    |  41 ++
 .../grammar/definition/table/MatchType.java     |  45 ++
 .../definition/table/ReferentialAction.java     |  57 ++
 .../definition/table/TableCommitAction.java     |  41 ++
 .../definition/table/TableConstraint.java       |  35 ++
 .../table/TableConstraintDefinition.java        |  55 ++
 .../definition/table/TableContentsSource.java   |  34 +
 .../definition/table/TableDefinition.java       |  65 ++
 .../grammar/definition/table/TableElement.java  |  36 ++
 .../definition/table/TableElementList.java      |  40 ++
 .../grammar/definition/table/TableScope.java    |  41 ++
 .../definition/table/UniqueConstraint.java      |  48 ++
 .../definition/table/UniqueSpecification.java   |  40 ++
 .../grammar/definition/table/package-info.java  |  23 +
 .../table/pgsql/PgSQLTableCommitAction.java     |  36 ++
 .../view/RegularViewSpecification.java          |  40 ++
 .../definition/view/ViewCheckOption.java        |  39 ++
 .../grammar/definition/view/ViewDefinition.java |  72 +++
 .../definition/view/ViewSpecification.java      |  33 +
 .../grammar/definition/view/package-info.java   |  23 +
 .../grammar/factories/BooleanFactory.java       | 283 +++++++++
 .../grammar/factories/ColumnsFactory.java       |  85 +++
 .../grammar/factories/DataTypeFactory.java      | 363 +++++++++++
 .../grammar/factories/DefinitionFactory.java    | 253 ++++++++
 .../grammar/factories/LiteralFactory.java       |  88 +++
 .../grammar/factories/ManipulationFactory.java  | 157 +++++
 .../grammar/factories/ModificationFactory.java  | 148 +++++
 .../grammar/factories/QueryFactory.java         | 227 +++++++
 .../factories/TableReferenceFactory.java        | 182 ++++++
 .../grammar/factories/package-info.java         |  23 +
 .../factories/pgsql/PgSQLDataTypeFactory.java   |  40 ++
 .../pgsql/PgSQLManipulationFactory.java         |  49 ++
 .../grammar/factories/pgsql/package-info.java   |  23 +
 .../grammar/literals/DirectLiteral.java         |  37 ++
 .../grammar/literals/LiteralExpression.java     |  33 +
 .../grammar/literals/NumericLiteral.java        |  36 ++
 .../grammar/literals/SQLFunctionLiteral.java    |  47 ++
 .../grammar/literals/StringLiteral.java         |  38 ++
 .../grammar/literals/TemporalLiteral.java       |  32 +
 .../grammar/literals/TimestampTimeLiteral.java  |  39 ++
 .../grammar/literals/package-info.java          |  23 +
 .../manipulation/AddColumnDefinition.java       |  40 ++
 .../AddTableConstraintDefinition.java           |  38 ++
 .../grammar/manipulation/AlterColumnAction.java |  53 ++
 .../manipulation/AlterColumnDefinition.java     |  46 ++
 .../grammar/manipulation/AlterStatement.java    |  33 +
 .../grammar/manipulation/AlterTableAction.java  |  34 +
 .../manipulation/AlterTableStatement.java       |  45 ++
 .../grammar/manipulation/DropBehaviour.java     |  41 ++
 .../manipulation/DropBehaviourContainer.java    |  36 ++
 .../manipulation/DropColumnDefinition.java      |  37 ++
 .../manipulation/DropSchemaStatement.java       |  37 ++
 .../grammar/manipulation/DropStatement.java     |  41 ++
 .../DropTableConstraintDefinition.java          |  37 ++
 .../manipulation/DropTableOrViewStatement.java  |  39 ++
 .../grammar/manipulation/ObjectType.java        |  46 ++
 .../grammar/manipulation/SetColumnDefault.java  |  37 ++
 .../grammar/manipulation/package-info.java      |  23 +
 .../pgsql/PgSQLDropTableOrViewStatement.java    |  31 +
 .../manipulation/pgsql/package-info.java        |  23 +
 .../grammar/modification/ColumnSource.java      |  60 ++
 .../modification/ColumnSourceByQuery.java       |  39 ++
 .../modification/ColumnSourceByValues.java      |  42 ++
 .../grammar/modification/DeleteBySearch.java    |  45 ++
 .../grammar/modification/DeleteStatement.java   |  35 ++
 .../modification/DynamicColumnSource.java       |  40 ++
 .../grammar/modification/InsertStatement.java   |  48 ++
 .../grammar/modification/SetClause.java         |  46 ++
 .../grammar/modification/TargetTable.java       |  49 ++
 .../grammar/modification/UpdateBySearch.java    |  56 ++
 .../grammar/modification/UpdateSource.java      |  33 +
 .../modification/UpdateSourceByExpression.java  |  39 ++
 .../grammar/modification/UpdateStatement.java   |  35 ++
 .../grammar/modification/ValueSource.java       |  82 +++
 .../grammar/modification/package-info.java      |  23 +
 .../pgsql/PgSQLInsertStatement.java             |  45 ++
 .../modification/pgsql/package-info.java        |  23 +
 .../generator/grammar/query/AsteriskSelect.java |  31 +
 .../grammar/query/ColumnReference.java          |  35 ++
 .../query/ColumnReferenceByExpression.java      |  40 ++
 .../grammar/query/ColumnReferenceByName.java    |  44 ++
 .../grammar/query/ColumnReferences.java         |  79 +++
 .../grammar/query/CorrespondingSpec.java        |  40 ++
 .../sql/generator/grammar/query/FromClause.java |  43 ++
 .../generator/grammar/query/GroupByClause.java  |  40 ++
 .../grammar/query/GroupingElement.java          |  59 ++
 .../grammar/query/LimitSpecification.java       |  42 ++
 .../grammar/query/OffsetSpecification.java      |  41 ++
 .../generator/grammar/query/OrderByClause.java  |  40 ++
 .../sql/generator/grammar/query/Ordering.java   |  21 +
 .../grammar/query/OrdinaryGroupingSet.java      |  40 ++
 .../grammar/query/QueryExpression.java          |  42 ++
 .../grammar/query/QueryExpressionBody.java      |  61 ++
 .../query/QueryExpressionBodyActual.java        |  33 +
 .../query/QueryExpressionBodyBinary.java        |  71 +++
 .../grammar/query/QueryExpressionBodyQuery.java |  32 +
 .../grammar/query/QuerySpecification.java       |  95 +++
 .../generator/grammar/query/RowDefinition.java  |  35 ++
 .../generator/grammar/query/RowSubQuery.java    |  32 +
 .../grammar/query/RowValueConstructor.java      |  34 +
 .../grammar/query/SelectColumnClause.java       |  40 ++
 .../generator/grammar/query/SetOperation.java   |  44 ++
 .../grammar/query/SortSpecification.java        |  46 ++
 .../sql/generator/grammar/query/TableAlias.java |  47 ++
 .../generator/grammar/query/TableReference.java |  41 ++
 .../query/TableReferenceByExpression.java       |  39 ++
 .../grammar/query/TableReferenceByName.java     |  40 ++
 .../grammar/query/TableReferencePrimary.java    |  40 ++
 .../grammar/query/TableValueConstructor.java    |  33 +
 .../grammar/query/joins/CrossJoinedTable.java   |  30 +
 .../grammar/query/joins/JoinCondition.java      |  39 ++
 .../grammar/query/joins/JoinSpecification.java  |  35 ++
 .../generator/grammar/query/joins/JoinType.java |  49 ++
 .../grammar/query/joins/JoinedTable.java        |  50 ++
 .../grammar/query/joins/NamedColumnsJoin.java   |  40 ++
 .../grammar/query/joins/NaturalJoinedTable.java |  37 ++
 .../query/joins/QualifiedJoinedTable.java       |  45 ++
 .../grammar/query/joins/UnionJoinedTable.java   |  31 +
 .../grammar/query/joins/package-info.java       |  23 +
 .../generator/grammar/query/package-info.java   |  23 +
 .../generator/implementation/TypeableImpl.java  | 104 ++++
 .../booleans/AbstractBooleanExpression.java     |  40 ++
 .../grammar/booleans/BetweenPredicateImpl.java  |  53 ++
 .../grammar/booleans/BinaryPredicateImpl.java   |  65 ++
 .../grammar/booleans/BooleanTestImpl.java       |  82 +++
 .../grammar/booleans/BooleanUtils.java          |  49 ++
 .../booleans/ComposedBooleanExpressionImpl.java |  54 ++
 .../grammar/booleans/ConjunctionImpl.java       |  70 +++
 .../grammar/booleans/DisjunctionImpl.java       |  70 +++
 .../grammar/booleans/EqualsPredicateImpl.java   |  43 ++
 .../grammar/booleans/ExistsPredicateImpl.java   |  49 ++
 .../booleans/GreaterOrEqualPredicateImpl.java   |  44 ++
 .../booleans/GreaterThanPredicateImpl.java      |  44 ++
 .../grammar/booleans/InPredicateImpl.java       |  56 ++
 .../booleans/IsNotNullPredicateImpl.java        |  43 ++
 .../grammar/booleans/IsNullPredicateImpl.java   |  43 ++
 .../booleans/LessOrEqualPredicateImpl.java      |  44 ++
 .../grammar/booleans/LessThanPredicateImpl.java |  44 ++
 .../grammar/booleans/LikePredicateImpl.java     |  43 ++
 .../grammar/booleans/MultiPredicateImpl.java    |  79 +++
 .../grammar/booleans/NegationImpl.java          |  61 ++
 .../booleans/NotBetweenPredicateImpl.java       |  55 ++
 .../booleans/NotEqualsPredicateImpl.java        |  44 ++
 .../grammar/booleans/NotInPredicateImpl.java    |  57 ++
 .../grammar/booleans/NotLikePredicateImpl.java  |  43 ++
 .../booleans/NotRegexpPredicateImpl.java        |  44 ++
 .../grammar/booleans/RegexpPredicateImpl.java   |  43 ++
 .../grammar/booleans/UnaryPredicateImpl.java    |  56 ++
 .../grammar/booleans/UniquePredicateImpl.java   |  49 ++
 .../builders/booleans/BooleanBuilderImpl.java   |  83 +++
 .../builders/booleans/InBuilderImpl.java        |  69 +++
 .../ForeignKeyConstraintBuilderImpl.java        | 140 +++++
 .../definition/SchemaDefinitionBuilderImpl.java |  88 +++
 .../definition/TableDefinitionBuilderImpl.java  |  98 +++
 .../definition/TableElementListBuilderImpl.java |  61 ++
 .../definition/UniqueConstraintBuilderImpl.java |  83 +++
 .../definition/ViewDefinitionBuilderImpl.java   | 110 ++++
 .../ColumnSourceByValuesBuilderImpl.java        |  93 +++
 .../modification/DeleteBySearchBuilderImpl.java |  71 +++
 .../InsertStatementBuilderImpl.java             |  72 +++
 .../modification/UpdateBySearchBuilderImpl.java |  87 +++
 .../pgsql/PgSQLInsertStatementBuilderImpl.java  |  52 ++
 .../query/AbstractQueryFactoryImpl.java         |  84 +++
 .../builders/query/ColumnsBuilderImpl.java      | 113 ++++
 .../grammar/builders/query/FromBuilderImpl.java |  75 +++
 .../builders/query/GroupByBuilderImpl.java      |  70 +++
 .../builders/query/OrderByBuilderImpl.java      |  69 +++
 .../builders/query/QueryBuilderImpl.java        | 148 +++++
 .../query/QuerySpecificationBuilderImpl.java    | 238 +++++++
 .../builders/query/SimpleQueryBuilderImpl.java  | 262 ++++++++
 .../query/TableReferenceBuilderImpl.java        |  78 +++
 .../grammar/common/ColumnNameListImpl.java      |  80 +++
 .../common/NonBooleanExpressionImpl.java        |  38 ++
 .../grammar/common/SQLBuilderBase.java          |  43 ++
 .../grammar/common/SQLFactoryBase.java          |  53 ++
 .../grammar/common/SQLSyntaxElementBase.java    |  52 ++
 .../grammar/common/TableNameDirectImpl.java     |  58 ++
 .../grammar/common/TableNameFunctionImpl.java   |  60 ++
 .../grammar/common/TableNameImpl.java           |  52 ++
 .../grammar/common/datatypes/BigIntImpl.java    |  46 ++
 .../grammar/common/datatypes/DecimalImpl.java   |  74 +++
 .../common/datatypes/DoublePrecisionImpl.java   |  43 ++
 .../grammar/common/datatypes/NumericImpl.java   |  73 +++
 .../grammar/common/datatypes/RealImpl.java      |  43 ++
 .../common/datatypes/SQLBooleanImpl.java        |  47 ++
 .../grammar/common/datatypes/SQLCharImpl.java   |  69 +++
 .../grammar/common/datatypes/SQLDateImpl.java   |  43 ++
 .../grammar/common/datatypes/SQLFloatImpl.java  |  60 ++
 .../common/datatypes/SQLIntegerImpl.java        |  46 ++
 .../common/datatypes/SQLIntervalImpl.java       | 103 ++++
 .../grammar/common/datatypes/SQLTimeImpl.java   |  74 +++
 .../common/datatypes/SQLTimeStampImpl.java      |  76 +++
 .../grammar/common/datatypes/SmallIntImpl.java  |  46 ++
 .../common/datatypes/UserDefinedTypeImpl.java   |  57 ++
 .../common/datatypes/pgsql/TextImpl.java        |  47 ++
 .../definition/schema/SchemaDefinitionImpl.java |  85 +++
 .../definition/table/CheckConstraintImpl.java   |  61 ++
 .../definition/table/ColumnDefinitionImpl.java  |  99 +++
 .../table/ForeignKeyConstraintImpl.java         | 113 ++++
 .../definition/table/LikeClauseImpl.java        |  63 ++
 .../table/TableConstraintDefinitionImpl.java    |  83 +++
 .../definition/table/TableDefinitionImpl.java   |  99 +++
 .../definition/table/TableElementListImpl.java  |  65 ++
 .../definition/table/UniqueConstraintImpl.java  |  74 +++
 .../view/RegularViewSpecificationImpl.java      |  60 ++
 .../definition/view/ViewDefinitionImpl.java     | 108 ++++
 .../factories/AbstractBooleanFactory.java       |  51 ++
 .../factories/AbstractColumnsFactory.java       |  44 ++
 .../factories/AbstractDataTypeFactory.java      | 109 ++++
 .../factories/AbstractDefinitionFactory.java    |  90 +++
 .../factories/AbstractModificationFactory.java  |  52 ++
 .../grammar/factories/AbstractQueryFactory.java |  60 ++
 .../factories/AbstractTableRefFactory.java      |  71 +++
 .../factories/DefaultBooleanFactory.java        | 209 +++++++
 .../factories/DefaultColumnsFactory.java        |  71 +++
 .../factories/DefaultDataTypeFactory.java       | 235 +++++++
 .../factories/DefaultDefinitionFactory.java     | 122 ++++
 .../factories/DefaultLiteralFactory.java        |  85 +++
 .../factories/DefaultManipulationFactory.java   | 122 ++++
 .../factories/DefaultModificationFactory.java   |  98 +++
 .../grammar/factories/DefaultQueryFactory.java  | 156 +++++
 .../factories/DefaultTableRefFactory.java       | 103 ++++
 .../pgsql/PgSQLDataTypeFactoryImpl.java         |  45 ++
 .../pgsql/PgSQLManipulationFactoryImpl.java     |  56 ++
 .../pgsql/PgSQLModificationFactoryImpl.java     |  41 ++
 .../grammar/literals/DirectLiteralImpl.java     |  59 ++
 .../grammar/literals/NumericLiteralImpl.java    |  59 ++
 .../literals/SQLFunctionLiteralImpl.java        |  83 +++
 .../grammar/literals/StringLiteralImpl.java     |  60 ++
 .../grammar/literals/TimestampLiteralImpl.java  |  61 ++
 .../manipulation/AddColumnDefinitionImpl.java   |  63 ++
 .../AddTableConstraintDefinitionImpl.java       |  62 ++
 .../manipulation/AlterColumnDefinitionImpl.java |  69 +++
 .../manipulation/AlterTableStatementImpl.java   |  70 +++
 .../manipulation/DropColumnDefinitionImpl.java  |  70 +++
 .../manipulation/DropSchemaStatementImpl.java   |  61 ++
 .../grammar/manipulation/DropStatementImpl.java |  66 ++
 .../DropTableConstraintDefinitionImpl.java      |  73 +++
 .../DropTableOrViewStatementImpl.java           |  63 ++
 .../manipulation/SetColumnDefaultImpl.java      |  60 ++
 .../PgSQLDropTableOrViewStatementImpl.java      |  66 ++
 .../modification/ColumnSourceByQueryImpl.java   |  54 ++
 .../modification/ColumnSourceByValuesImpl.java  |  64 ++
 .../modification/DeleteBySearchImpl.java        |  72 +++
 .../modification/DynamicColumnSourceImpl.java   |  57 ++
 .../modification/InsertStatementImpl.java       |  70 +++
 .../grammar/modification/SetClauseImpl.java     |  70 +++
 .../grammar/modification/TargetTableImpl.java   |  72 +++
 .../modification/UpdateBySearchImpl.java        |  98 +++
 .../UpdateSourceByExpressionImpl.java           |  61 ++
 .../pgsql/PgSQLInsertStatementImpl.java         |  46 ++
 .../grammar/query/AsteriskSelectImpl.java       |  42 ++
 .../query/ColumnReferenceByExpressionImpl.java  |  58 ++
 .../query/ColumnReferenceByNameImpl.java        |  68 ++
 .../grammar/query/ColumnReferenceImpl.java      |  38 ++
 .../grammar/query/ColumnReferencesImpl.java     |  79 +++
 .../grammar/query/CorrespondingSpecImpl.java    |  60 ++
 .../grammar/query/FromClauseImpl.java           |  72 +++
 .../grammar/query/GroupByClauseImpl.java        |  61 ++
 .../grammar/query/LimitSpecificationImpl.java   |  59 ++
 .../grammar/query/OffsetSpecificationImpl.java  |  60 ++
 .../grammar/query/OrderByClauseImpl.java        |  62 ++
 .../grammar/query/OrdinaryGroupingSetImpl.java  |  73 +++
 .../query/QueryExpressionBodyBinaryImpl.java    | 105 ++++
 .../grammar/query/QueryExpressionBodyImpl.java  |  37 ++
 .../grammar/query/QueryExpressionImpl.java      |  60 ++
 .../grammar/query/QuerySpecificationImpl.java   | 130 ++++
 .../grammar/query/RowDefinitionImpl.java        |  63 ++
 .../grammar/query/RowSubQueryImpl.java          |  60 ++
 .../grammar/query/SelectColumnClauseImpl.java   |  56 ++
 .../grammar/query/SortSpecificationImpl.java    |  71 +++
 .../grammar/query/TableAliasImpl.java           |  68 ++
 .../query/TableReferenceByExpressionImpl.java   |  54 ++
 .../grammar/query/TableReferenceByNameImpl.java |  53 ++
 .../grammar/query/TableReferenceImpl.java       |  44 ++
 .../query/TableReferencePrimaryImpl.java        |  54 ++
 .../query/TableValueConstructorImpl.java        |  61 ++
 .../query/joins/CrossJoinedTableImpl.java       |  55 ++
 .../grammar/query/joins/JoinConditionImpl.java  |  59 ++
 .../query/joins/JoinSpecificationImpl.java      |  39 ++
 .../grammar/query/joins/JoinedTableImpl.java    |  70 +++
 .../query/joins/NamedColumnsJoinImpl.java       |  59 ++
 .../query/joins/NaturalJoinedTableImpl.java     |  67 ++
 .../query/joins/QualifiedJoinedTableImpl.java   |  78 +++
 .../query/joins/UnionJoinedTableImpl.java       |  55 ++
 .../transformation/AbstractProcessor.java       |  51 ++
 .../BooleanExpressionProcessing.java            | 289 +++++++++
 .../transformation/ColumnProcessing.java        |  95 +++
 .../transformation/ConstantProcessor.java       |  49 ++
 .../transformation/DataTypeProcessing.java      | 275 +++++++++
 .../transformation/DefaultSQLProcessor.java     | 571 +++++++++++++++++
 .../transformation/DefinitionProcessing.java    | 516 ++++++++++++++++
 .../LiteralExpressionProcessing.java            | 128 ++++
 .../transformation/ManipulationProcessing.java  | 230 +++++++
 .../transformation/ModificationProcessing.java  | 291 +++++++++
 .../transformation/NoOpProcessor.java           |  34 +
 .../transformation/ProcessorUtils.java          |  60 ++
 .../transformation/QueryProcessing.java         | 615 +++++++++++++++++++
 .../TableReferenceProcessing.java               | 354 +++++++++++
 .../transformation/derby/DerbyProcessor.java    |  32 +
 .../transformation/h2/H2Processor.java          |  33 +
 .../mysql/DefinitionProcessing.java             |  54 ++
 .../transformation/mysql/MySQLProcessor.java    |  81 +++
 .../transformation/mysql/QueryProcessing.java   | 114 ++++
 .../transformation/mysql/TableProcessing.java   |  52 ++
 .../transformation/package-info.java            |  23 +
 .../pgsql/DefinitionProcessing.java             |  90 +++
 .../pgsql/LiteralExpressionProcessing.java      |  40 ++
 .../pgsql/ManipulationProcessing.java           |  56 ++
 .../pgsql/ModificationProcessing.java           |  48 ++
 .../pgsql/PostgreSQLProcessor.java              | 132 ++++
 .../transformation/pgsql/QueryProcessing.java   |  81 +++
 .../transformation/spi/SQLProcessor.java        |  30 +
 .../spi/SQLProcessorAggregator.java             |  47 ++
 .../sqlite/DefinitionProcessing.java            | 141 +++++
 .../transformation/sqlite/SQLiteProcessor.java  |  82 +++
 .../implementation/vendor/DefaultVendor.java    | 254 ++++++++
 .../vendor/derby/DerbyVendorImpl.java           |  44 ++
 .../implementation/vendor/h2/H2VendorImpl.java  |  45 ++
 .../vendor/mysql/MySQLVendorImpl.java           |  61 ++
 .../vendor/pgsql/PostgreSQLVendorImpl.java      | 108 ++++
 .../vendor/sqlite/SQLiteVendorImpl.java         |  45 ++
 .../sql/generator/vendor/DerbyVendor.java       |  25 +
 .../library/sql/generator/vendor/H2Vendor.java  |  25 +
 .../sql/generator/vendor/MySQLVendor.java       |  53 ++
 .../sql/generator/vendor/PostgreSQLVendor.java  |  67 ++
 .../library/sql/generator/vendor/SQLVendor.java | 137 +++++
 .../sql/generator/vendor/SQLVendorProvider.java |  52 ++
 .../sql/generator/vendor/SQLiteVendor.java      |  25 +
 .../vendor/UnsupportedElementException.java     |  53 ++
 .../sql/generator/vendor/package-info.java      |  23 +
 ...ene.library.sql.generator.vendor.DerbyVendor |   1 +
 ...lygene.library.sql.generator.vendor.H2Vendor |   1 +
 ...ene.library.sql.generator.vendor.MySQLVendor |   1 +
 ...ibrary.sql.generator.vendor.PostgreSQLVendor |   1 +
 ...ygene.library.sql.generator.vendor.SQLVendor |   1 +
 ...ne.library.sql.generator.vendor.SQLiteVendor |   1 +
 .../generator/AbstractDataDefinitionTest.java   | 166 +++++
 .../sql/generator/AbstractModificationTest.java |  57 ++
 .../sql/generator/AbstractQueryTest.java        | 364 +++++++++++
 .../sql/generator/AbstractSQLSyntaxTest.java    |  62 ++
 .../generator/DefaultDataDefinitionTest.java    |  32 +
 .../sql/generator/DefaultModificationTest.java  |  29 +
 .../sql/generator/DefaultSQLQueryTest.java      |  32 +
 .../sql/generator/H2DataDefinitionTest.java     |  32 +
 .../sql/generator/H2ModificationTest.java       |  30 +
 .../library/sql/generator/H2QueryTest.java      |  32 +
 .../sql/generator/MySQLDataDefinitionTest.java  |  33 +
 .../sql/generator/MySQLModificationTest.java    |  30 +
 .../library/sql/generator/MySQLQueryTest.java   |  58 ++
 .../generator/PostgreSQLDataDefinitionTest.java |  31 +
 .../generator/PostgreSQLModificationTest.java   |  68 ++
 .../sql/generator/PostgreSQLQueryTest.java      |  57 ++
 .../sql/generator/SQLiteDataDefinitionTest.java |  30 +
 .../sql/generator/SQLiteModificationTest.java   |  30 +
 .../library/sql/generator/SQLiteQueryTest.java  |  30 +
 libraries/sql/build.gradle                      |   2 +-
 manual/src/docs/userguide/tools.txt             |   3 +-
 settings.gradle                                 |   1 +
 tools/envisage/src/docs/envisage.txt            |  55 --
 tools/generator-polygene/dev-status.xml         |  39 ++
 tools/src/docs/envisage.txt                     |  55 ++
 478 files changed, 30156 insertions(+), 229 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java
index 666d3d1..b149220 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java
@@ -19,14 +19,14 @@
  */
 package org.apache.polygene.runtime.instantiation;
 
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Assert;
+import org.junit.Test;
 
 import static org.junit.Assert.fail;
 
@@ -41,7 +41,7 @@ public class ValueInstantiationTests
     }
 
     @Test
-    public void whenTryingToCreateValueFromNullTypeThenExpectNullArgumentException()
+    public void whenTryingToCreateValueFromNullTypeThenExpectNullPointerException()
         throws Exception
     {
         // valueBuilderFactory.newValueBuilder()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
index 3d5120f..937c03a 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
@@ -21,12 +21,12 @@ package org.apache.polygene.test.cache;
 
 import java.util.Collection;
 import java.util.Random;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.constraint.ConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.spi.cache.Cache;
 import org.apache.polygene.spi.cache.CachePool;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -51,7 +51,7 @@ public abstract class AbstractCachePoolTest
     }
 
     @Test
-    public void givenInvalidCacheNameWhenFetchingCacheExpectNullArgumentException()
+    public void givenInvalidCacheNameWhenFetchingCacheExpectIllegalArgumentException()
     {
         try
         {
@@ -62,11 +62,15 @@ public abstract class AbstractCachePoolTest
         {
             // expected
         }
+    }
+
+    @Test
+    public void givenNullKeyWhenFetchingCacheExpectConstraintViolationException()
+    {
         try
         {
             cache = cachePool.fetchCache( null, String.class );
-            fail( "Expected " + NullPointerException.class.getSimpleName() );
-
+            fail( "Expected " + ConstraintViolationException.class.getSimpleName() );
         }
         catch( ConstraintViolationException e )
         {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/dependencies.gradle
----------------------------------------------------------------------
diff --git a/dependencies.gradle b/dependencies.gradle
index 22595b8..8e467f4 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -54,7 +54,6 @@ def groovyVersion = '2.4.10'
 def hazelcastVersion = '3.8'
 def httpClientVersion = '4.5.3'
 def jacksonVersion = '2.8.7'
-def javasqlgeneratorVersion = '0.3.2'
 def jaxbApiVersion = '2.2.12'
 def jcloudsVersion = '2.0.1'
 def jdbmVersion = '2.4'
@@ -97,8 +96,6 @@ dependencies.libraries << [
   hazelcast           : "com.hazelcast:hazelcast:$hazelcastVersion",
   http_client         : "org.apache.httpcomponents:httpclient:$httpClientVersion",
   jackson_mapper      : "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion",
-  javaSqlGenerator    : "org.java-sql-generator:org.java-sql-generator.api:$javasqlgeneratorVersion",
-  javaSqlGeneratorImpl: "org.java-sql-generator:org.java-sql-generator.implementation:$javasqlgeneratorVersion",
   jaxb_api            : "javax.xml.bind:jaxb-api:$jaxbApiVersion",
   jclouds_core        : "org.apache.jclouds:jclouds-core:$jcloudsVersion",
   jclouds_blobstore   : "org.apache.jclouds:jclouds-allblobstore:$jcloudsVersion",

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/build.gradle b/extensions/indexing-sql/build.gradle
index e0e50e8..e333730 100644
--- a/extensions/indexing-sql/build.gradle
+++ b/extensions/indexing-sql/build.gradle
@@ -27,12 +27,9 @@ jar { manifest { name = "Apache Polygeneâ„¢ Extension - Indexing - SQL" } }
 dependencies {
   api polygene.core.bootstrap
   api polygene.library( 'sql' )
+  api polygene.library( 'sql-generator' )
 
   implementation polygene.extension( 'reindexer' )
-  implementation libraries.javaSqlGenerator
-  implementation( libraries.javaSqlGeneratorImpl ) {
-    exclude group: 'junit'
-  }
 
   runtimeOnly polygene.core.runtime
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/AbstractSQLIndexQueryAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/AbstractSQLIndexQueryAssembler.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/AbstractSQLIndexQueryAssembler.java
index a9dcd0c..776c3c9 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/AbstractSQLIndexQueryAssembler.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/AbstractSQLIndexQueryAssembler.java
@@ -30,8 +30,8 @@ import org.apache.polygene.index.reindexer.ReindexerConfiguration;
 import org.apache.polygene.index.reindexer.ReindexerService;
 import org.apache.polygene.index.sql.SQLIndexingEngineConfiguration;
 import org.apache.polygene.index.sql.support.common.ReindexingStrategy;
-import org.sql.generation.api.vendor.SQLVendor;
-import org.sql.generation.api.vendor.SQLVendorProvider;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider;
 
 public abstract class AbstractSQLIndexQueryAssembler<AssemblerType>
     extends Assemblers.VisibilityIdentityConfig<AssemblerType>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/PostgreSQLIndexQueryAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/PostgreSQLIndexQueryAssembler.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/PostgreSQLIndexQueryAssembler.java
index ace0969..b5e8cc6 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/PostgreSQLIndexQueryAssembler.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/assembly/PostgreSQLIndexQueryAssembler.java
@@ -21,9 +21,9 @@ package org.apache.polygene.index.sql.assembly;
 
 import java.io.IOException;
 import org.apache.polygene.index.sql.support.postgresql.PostgreSQLService;
-import org.sql.generation.api.vendor.PostgreSQLVendor;
-import org.sql.generation.api.vendor.SQLVendor;
-import org.sql.generation.api.vendor.SQLVendorProvider;
+import org.apache.polygene.library.sql.generator.vendor.PostgreSQLVendor;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider;
 
 public class PostgreSQLIndexQueryAssembler
     extends AbstractSQLIndexQueryAssembler<PostgreSQLIndexQueryAssembler>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/common/GenericDatabaseExplorer.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/common/GenericDatabaseExplorer.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/common/GenericDatabaseExplorer.java
index ea2493d..d6128fd 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/common/GenericDatabaseExplorer.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/common/GenericDatabaseExplorer.java
@@ -29,11 +29,11 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import org.apache.polygene.library.sql.common.SQLUtil;
+import org.apache.polygene.library.sql.generator.grammar.builders.query.QuerySpecificationBuilder;
+import org.apache.polygene.library.sql.generator.grammar.factories.QueryFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.TableReferenceFactory;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 import org.apache.polygene.spi.query.IndexExporter;
-import org.sql.generation.api.grammar.builders.query.QuerySpecificationBuilder;
-import org.sql.generation.api.grammar.factories.QueryFactory;
-import org.sql.generation.api.grammar.factories.TableReferenceFactory;
-import org.sql.generation.api.vendor.SQLVendor;
 
 /**
  * This is a helper class to traverse through all content in specified tables in database. Typical usecase would be by
@@ -41,7 +41,7 @@ import org.sql.generation.api.vendor.SQLVendor;
  */
 public final class GenericDatabaseExplorer
 {
-    public static enum IntegrityActions
+    public enum IntegrityActions
     {
         CASCADE,
         NO_ACTION,
@@ -50,7 +50,7 @@ public final class GenericDatabaseExplorer
         SET_NULL
     }
 
-    public static enum Deferrability
+    public enum Deferrability
     {
         INITIALLY_DEFERRED,
         INITIALLY_IMMEDIATE,
@@ -207,33 +207,33 @@ public final class GenericDatabaseExplorer
 
     }
 
-    public static interface DatabaseProcessor
+    public interface DatabaseProcessor
     {
-        public void beginProcessSchemaInfo( String schemaName );
+        void beginProcessSchemaInfo( String schemaName );
 
-        public void endProcessSchemaInfo( String schemaName );
+        void endProcessSchemaInfo( String schemaName );
 
-        public void beginProcessTableInfo( String schemaName, String tableName, String remarks );
+        void beginProcessTableInfo( String schemaName, String tableName, String remarks );
 
-        public void endProcessTableInfo( String schemaName, String tableName, String remarks );
+        void endProcessTableInfo( String schemaName, String tableName, String remarks );
 
-        public void beginProcessColumns( String schemaName, String tableName, String tableRemarks );
+        void beginProcessColumns( String schemaName, String tableName, String tableRemarks );
 
-        public void beginProcessColumnInfo( String schemaName, String tableName,
-                                            ColumnInfo colInfo, ForeignKeyInfo fkInfo );
+        void beginProcessColumnInfo( String schemaName, String tableName,
+                                     ColumnInfo colInfo, ForeignKeyInfo fkInfo );
 
-        public void endProcessColumnInfo( String schemaName, String tableName,
-                                          ColumnInfo colInfo, ForeignKeyInfo fkInfo );
+        void endProcessColumnInfo( String schemaName, String tableName,
+                                   ColumnInfo colInfo, ForeignKeyInfo fkInfo );
 
-        public void endProcessColumns( String schemaName, String tableName, String tableRemarks );
+        void endProcessColumns( String schemaName, String tableName, String tableRemarks );
 
-        public void beginProcessRows( String schemaName, String tableName, String tableRemarks );
+        void beginProcessRows( String schemaName, String tableName, String tableRemarks );
 
-        public void beginProcessRowInfo( String schemaName, String tableName, Object[] rowContents );
+        void beginProcessRowInfo( String schemaName, String tableName, Object[] rowContents );
 
-        public void endProcessRowInfo( String schemaName, String tableName, Object[] rowContents );
+        void endProcessRowInfo( String schemaName, String tableName, Object[] rowContents );
 
-        public void endProcessRows( String schemaName, String tableName, String tableRemarks );
+        void endProcessRows( String schemaName, String tableName, String tableRemarks );
     }
 
     public static abstract class DatabaseProcessorAdapter

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLAppStartup.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLAppStartup.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLAppStartup.java
index e2b3d71..ef6e746 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLAppStartup.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLAppStartup.java
@@ -27,13 +27,13 @@ import org.apache.polygene.api.injection.scope.Uses;
 import org.apache.polygene.api.service.ServiceDescriptor;
 import org.apache.polygene.index.sql.support.skeletons.AbstractSQLStartup;
 import org.apache.polygene.library.sql.common.SQLUtil;
-import org.sql.generation.api.grammar.common.datatypes.SQLDataType;
-import org.sql.generation.api.grammar.definition.table.TableScope;
-import org.sql.generation.api.grammar.definition.table.pgsql.PgSQLTableCommitAction;
-import org.sql.generation.api.grammar.factories.DataTypeFactory;
-import org.sql.generation.api.grammar.factories.DefinitionFactory;
-import org.sql.generation.api.grammar.factories.TableReferenceFactory;
-import org.sql.generation.api.vendor.PostgreSQLVendor;
+import org.apache.polygene.library.sql.generator.grammar.common.datatypes.SQLDataType;
+import org.apache.polygene.library.sql.generator.grammar.definition.table.TableScope;
+import org.apache.polygene.library.sql.generator.grammar.definition.table.pgsql.PgSQLTableCommitAction;
+import org.apache.polygene.library.sql.generator.grammar.factories.DataTypeFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.DefinitionFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.TableReferenceFactory;
+import org.apache.polygene.library.sql.generator.vendor.PostgreSQLVendor;
 
 public class PostgreSQLAppStartup
     extends AbstractSQLStartup

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexExporter.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexExporter.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexExporter.java
index 9e80309..2dd7408 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexExporter.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexExporter.java
@@ -38,8 +38,8 @@ import org.apache.polygene.index.sql.support.common.GenericDatabaseExplorer.Data
 import org.apache.polygene.index.sql.support.common.GenericDatabaseExplorer.ForeignKeyInfo;
 import org.apache.polygene.index.sql.support.skeletons.SQLDBState;
 import org.apache.polygene.library.sql.common.SQLUtil;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 import org.apache.polygene.spi.query.IndexExporter;
-import org.sql.generation.api.vendor.SQLVendor;
 
 public class PostgreSQLIndexExporter
     implements IndexExporter

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexing.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexing.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexing.java
index 06aca9e..ec39e99 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexing.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLIndexing.java
@@ -26,16 +26,16 @@ import java.sql.SQLException;
 import org.apache.polygene.index.sql.support.common.DBNames;
 import org.apache.polygene.index.sql.support.skeletons.AbstractSQLIndexing;
 import org.apache.polygene.library.sql.common.SQLUtil;
+import org.apache.polygene.library.sql.generator.grammar.builders.modification.ColumnSourceByValuesBuilder;
+import org.apache.polygene.library.sql.generator.grammar.builders.modification.pgsql.PgSQLInsertStatementBuilder;
+import org.apache.polygene.library.sql.generator.grammar.factories.ColumnsFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.LiteralFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.ModificationFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.TableReferenceFactory;
+import org.apache.polygene.library.sql.generator.grammar.modification.InsertStatement;
+import org.apache.polygene.library.sql.generator.grammar.modification.ValueSource;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 import org.apache.polygene.spi.entity.EntityState;
-import org.sql.generation.api.grammar.builders.modification.ColumnSourceByValuesBuilder;
-import org.sql.generation.api.grammar.builders.modification.pgsql.PgSQLInsertStatementBuilder;
-import org.sql.generation.api.grammar.factories.ColumnsFactory;
-import org.sql.generation.api.grammar.factories.LiteralFactory;
-import org.sql.generation.api.grammar.factories.ModificationFactory;
-import org.sql.generation.api.grammar.factories.TableReferenceFactory;
-import org.sql.generation.api.grammar.modification.InsertStatement;
-import org.sql.generation.api.grammar.modification.ValueSource;
-import org.sql.generation.api.vendor.SQLVendor;
 
 public class PostgreSQLIndexing
     extends AbstractSQLIndexing

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLQuerying.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLQuerying.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLQuerying.java
index 6e4723a..939c718 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLQuerying.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/postgresql/PostgreSQLQuerying.java
@@ -25,9 +25,9 @@ import java.util.function.Predicate;
 import org.apache.polygene.api.composite.Composite;
 import org.apache.polygene.api.query.grammar.OrderBy;
 import org.apache.polygene.index.sql.support.skeletons.AbstractSQLQuerying;
-import org.sql.generation.api.grammar.builders.query.QuerySpecificationBuilder;
-import org.sql.generation.api.grammar.query.QueryExpression;
-import org.sql.generation.api.vendor.SQLVendor;
+import org.apache.polygene.library.sql.generator.grammar.builders.query.QuerySpecificationBuilder;
+import org.apache.polygene.library.sql.generator.grammar.query.QueryExpression;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 
 public class PostgreSQLQuerying
         extends AbstractSQLQuerying

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLIndexing.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLIndexing.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLIndexing.java
index 9459941..47e0503 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLIndexing.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLIndexing.java
@@ -55,26 +55,26 @@ import org.apache.polygene.index.sql.support.common.QNameInfo.QNameType;
 import org.apache.polygene.index.sql.support.postgresql.PostgreSQLTypeHelper;
 import org.apache.polygene.index.sql.support.skeletons.SQLSkeletonUtil.Lazy;
 import org.apache.polygene.library.sql.common.SQLUtil;
+import org.apache.polygene.library.sql.generator.grammar.builders.modification.ColumnSourceByValuesBuilder;
+import org.apache.polygene.library.sql.generator.grammar.builders.modification.DeleteBySearchBuilder;
+import org.apache.polygene.library.sql.generator.grammar.builders.modification.UpdateBySearchBuilder;
+import org.apache.polygene.library.sql.generator.grammar.builders.query.QuerySpecificationBuilder;
+import org.apache.polygene.library.sql.generator.grammar.factories.BooleanFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.ColumnsFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.LiteralFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.ModificationFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.QueryFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.TableReferenceFactory;
+import org.apache.polygene.library.sql.generator.grammar.modification.DeleteStatement;
+import org.apache.polygene.library.sql.generator.grammar.modification.InsertStatement;
+import org.apache.polygene.library.sql.generator.grammar.modification.UpdateSourceByExpression;
+import org.apache.polygene.library.sql.generator.grammar.modification.UpdateStatement;
+import org.apache.polygene.library.sql.generator.grammar.query.QueryExpression;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 import org.apache.polygene.spi.PolygeneSPI;
 import org.apache.polygene.spi.entity.EntityState;
 import org.apache.polygene.spi.entity.EntityStatus;
 import org.apache.polygene.spi.entitystore.EntityStoreException;
-import org.sql.generation.api.grammar.builders.modification.ColumnSourceByValuesBuilder;
-import org.sql.generation.api.grammar.builders.modification.DeleteBySearchBuilder;
-import org.sql.generation.api.grammar.builders.modification.UpdateBySearchBuilder;
-import org.sql.generation.api.grammar.builders.query.QuerySpecificationBuilder;
-import org.sql.generation.api.grammar.factories.BooleanFactory;
-import org.sql.generation.api.grammar.factories.ColumnsFactory;
-import org.sql.generation.api.grammar.factories.LiteralFactory;
-import org.sql.generation.api.grammar.factories.ModificationFactory;
-import org.sql.generation.api.grammar.factories.QueryFactory;
-import org.sql.generation.api.grammar.factories.TableReferenceFactory;
-import org.sql.generation.api.grammar.modification.DeleteStatement;
-import org.sql.generation.api.grammar.modification.InsertStatement;
-import org.sql.generation.api.grammar.modification.UpdateSourceByExpression;
-import org.sql.generation.api.grammar.modification.UpdateStatement;
-import org.sql.generation.api.grammar.query.QueryExpression;
-import org.sql.generation.api.vendor.SQLVendor;
 
 import static org.apache.polygene.index.sql.support.common.DBNames.ENTITY_TABLE_NAME;
 import static org.apache.polygene.index.sql.support.common.DBNames.ENTITY_TYPES_JOIN_TABLE_NAME;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java
index 331e034..1e8d0c0 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLQuerying.java
@@ -36,7 +36,6 @@ import org.apache.polygene.api.common.QualifiedName;
 import org.apache.polygene.api.composite.Composite;
 import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.identity.HasIdentity;
-import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.injection.scope.Uses;
@@ -71,33 +70,33 @@ import org.apache.polygene.index.sql.support.api.SQLQuerying;
 import org.apache.polygene.index.sql.support.common.DBNames;
 import org.apache.polygene.index.sql.support.common.QNameInfo;
 import org.apache.polygene.index.sql.support.postgresql.PostgreSQLTypeHelper;
+import org.apache.polygene.library.sql.generator.grammar.booleans.BooleanExpression;
+import org.apache.polygene.library.sql.generator.grammar.builders.booleans.BooleanBuilder;
+import org.apache.polygene.library.sql.generator.grammar.builders.booleans.InBuilder;
+import org.apache.polygene.library.sql.generator.grammar.builders.query.GroupByBuilder;
+import org.apache.polygene.library.sql.generator.grammar.builders.query.QueryBuilder;
+import org.apache.polygene.library.sql.generator.grammar.builders.query.QuerySpecificationBuilder;
+import org.apache.polygene.library.sql.generator.grammar.builders.query.TableReferenceBuilder;
+import org.apache.polygene.library.sql.generator.grammar.common.NonBooleanExpression;
+import org.apache.polygene.library.sql.generator.grammar.common.SQLFunctions;
+import org.apache.polygene.library.sql.generator.grammar.common.SetQuantifier;
+import org.apache.polygene.library.sql.generator.grammar.factories.BooleanFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.ColumnsFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.LiteralFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.QueryFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.TableReferenceFactory;
+import org.apache.polygene.library.sql.generator.grammar.query.ColumnReference;
+import org.apache.polygene.library.sql.generator.grammar.query.ColumnReferenceByName;
+import org.apache.polygene.library.sql.generator.grammar.query.Ordering;
+import org.apache.polygene.library.sql.generator.grammar.query.QueryExpression;
+import org.apache.polygene.library.sql.generator.grammar.query.QuerySpecification;
+import org.apache.polygene.library.sql.generator.grammar.query.TableReferenceByName;
+import org.apache.polygene.library.sql.generator.grammar.query.joins.JoinType;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 import org.apache.polygene.spi.PolygeneSPI;
 import org.apache.polygene.spi.query.EntityFinderException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.sql.generation.api.grammar.booleans.BooleanExpression;
-import org.sql.generation.api.grammar.builders.booleans.BooleanBuilder;
-import org.sql.generation.api.grammar.builders.booleans.InBuilder;
-import org.sql.generation.api.grammar.builders.query.GroupByBuilder;
-import org.sql.generation.api.grammar.builders.query.QueryBuilder;
-import org.sql.generation.api.grammar.builders.query.QuerySpecificationBuilder;
-import org.sql.generation.api.grammar.builders.query.TableReferenceBuilder;
-import org.sql.generation.api.grammar.common.NonBooleanExpression;
-import org.sql.generation.api.grammar.common.SQLFunctions;
-import org.sql.generation.api.grammar.common.SetQuantifier;
-import org.sql.generation.api.grammar.factories.BooleanFactory;
-import org.sql.generation.api.grammar.factories.ColumnsFactory;
-import org.sql.generation.api.grammar.factories.LiteralFactory;
-import org.sql.generation.api.grammar.factories.QueryFactory;
-import org.sql.generation.api.grammar.factories.TableReferenceFactory;
-import org.sql.generation.api.grammar.query.ColumnReference;
-import org.sql.generation.api.grammar.query.ColumnReferenceByName;
-import org.sql.generation.api.grammar.query.Ordering;
-import org.sql.generation.api.grammar.query.QueryExpression;
-import org.sql.generation.api.grammar.query.QuerySpecification;
-import org.sql.generation.api.grammar.query.TableReferenceByName;
-import org.sql.generation.api.grammar.query.joins.JoinType;
-import org.sql.generation.api.vendor.SQLVendor;
 
 public abstract class AbstractSQLQuerying
     implements SQLQuerying
@@ -190,26 +189,26 @@ public abstract class AbstractSQLQuerying
         }
     }
 
-    public static interface SQLBooleanCreator
+    public interface SQLBooleanCreator
     {
-        public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+        BooleanExpression getExpression(
             BooleanFactory factory,
             NonBooleanExpression left, NonBooleanExpression right
-        );
+                                       );
     }
 
-    private static interface BooleanExpressionProcessor
+    private interface BooleanExpressionProcessor
     {
-        public QueryBuilder processBooleanExpression(
+        QueryBuilder processBooleanExpression(
             AbstractSQLQuerying thisObject,
             Predicate<Composite> expression,
             Boolean negationActive,
             SQLVendor vendor,
-            org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition,
+            BooleanExpression entityTypeCondition,
             Map<String, Object> variables,
             List<Object> values,
             List<Integer> valueSQLTypes
-        );
+                                             );
     }
 
     private static final Map<Class<? extends Predicate>, SQLBooleanCreator> SQL_OPERATORS;
@@ -232,10 +231,10 @@ public abstract class AbstractSQLQuerying
         SQL_OPERATORS.put( EqPredicate.class, new SQLBooleanCreator()
         {
             @Override
-            public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+            public BooleanExpression getExpression(
                 BooleanFactory factory,
                 NonBooleanExpression left, NonBooleanExpression right
-            )
+                                                  )
             {
                 return factory.eq( left, right );
             }
@@ -243,10 +242,10 @@ public abstract class AbstractSQLQuerying
         SQL_OPERATORS.put( GePredicate.class, new SQLBooleanCreator()
         {
             @Override
-            public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+            public BooleanExpression getExpression(
                 BooleanFactory factory,
                 NonBooleanExpression left, NonBooleanExpression right
-            )
+                                                  )
             {
                 return factory.geq( left, right );
             }
@@ -254,10 +253,10 @@ public abstract class AbstractSQLQuerying
         SQL_OPERATORS.put( GtPredicate.class, new SQLBooleanCreator()
         {
             @Override
-            public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+            public BooleanExpression getExpression(
                 BooleanFactory factory,
                 NonBooleanExpression left, NonBooleanExpression right
-            )
+                                                  )
             {
                 return factory.gt( left, right );
             }
@@ -265,10 +264,10 @@ public abstract class AbstractSQLQuerying
         SQL_OPERATORS.put( LePredicate.class, new SQLBooleanCreator()
         {
             @Override
-            public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+            public BooleanExpression getExpression(
                 BooleanFactory factory,
                 NonBooleanExpression left, NonBooleanExpression right
-            )
+                                                  )
             {
                 return factory.leq( left, right );
             }
@@ -276,10 +275,10 @@ public abstract class AbstractSQLQuerying
         SQL_OPERATORS.put( LtPredicate.class, new SQLBooleanCreator()
         {
             @Override
-            public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+            public BooleanExpression getExpression(
                 BooleanFactory factory,
                 NonBooleanExpression left, NonBooleanExpression right
-            )
+                                                  )
             {
                 return factory.lt( left, right );
             }
@@ -287,10 +286,10 @@ public abstract class AbstractSQLQuerying
         SQL_OPERATORS.put( ManyAssociationContainsPredicate.class, new SQLBooleanCreator()
         {
             @Override
-            public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+            public BooleanExpression getExpression(
                 BooleanFactory factory,
                 NonBooleanExpression left, NonBooleanExpression right
-            )
+                                                  )
             {
                 return factory.eq( left, right );
             }
@@ -298,10 +297,10 @@ public abstract class AbstractSQLQuerying
         SQL_OPERATORS.put( MatchesPredicate.class, new SQLBooleanCreator()
         {
             @Override
-            public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+            public BooleanExpression getExpression(
                 BooleanFactory factory,
                 NonBooleanExpression left, NonBooleanExpression right
-            )
+                                                  )
             {
                 return factory.regexp( left, right );
             }
@@ -309,10 +308,10 @@ public abstract class AbstractSQLQuerying
         SQL_OPERATORS.put( ContainsPredicate.class, new SQLBooleanCreator()
         {
             @Override
-            public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+            public BooleanExpression getExpression(
                 BooleanFactory factory,
                 NonBooleanExpression left, NonBooleanExpression right
-            )
+                                                  )
             {
                 return factory.eq( left, right );
             }
@@ -320,10 +319,10 @@ public abstract class AbstractSQLQuerying
         SQL_OPERATORS.put( ContainsAllPredicate.class, new SQLBooleanCreator()
         {
             @Override
-            public org.sql.generation.api.grammar.booleans.BooleanExpression getExpression(
+            public BooleanExpression getExpression(
                 BooleanFactory factory,
                 NonBooleanExpression left, NonBooleanExpression right
-            )
+                                                  )
             {
                 return factory.eq( left, right );
             }
@@ -605,10 +604,10 @@ public abstract class AbstractSQLQuerying
 
     private interface WhereClauseProcessor
     {
-        public void processWhereClause( QuerySpecificationBuilder builder,
-                                        BooleanBuilder afterWhere,
-                                        JoinType joinStyle, Integer firstTableIndex, Integer lastTableIndex
-        );
+        void processWhereClause( QuerySpecificationBuilder builder,
+                                 BooleanBuilder afterWhere,
+                                 JoinType joinStyle, Integer firstTableIndex, Integer lastTableIndex
+                               );
     }
 
     private static class PropertyNullWhereClauseProcessor
@@ -825,10 +824,10 @@ public abstract class AbstractSQLQuerying
         return result;
     }
 
-    protected org.sql.generation.api.grammar.booleans.BooleanExpression createTypeCondition(
+    protected BooleanExpression createTypeCondition(
         Class<?> resultType,
         SQLVendor vendor
-    )
+                                                   )
     {
         BooleanFactory b = vendor.getBooleanFactory();
         LiteralFactory l = vendor.getLiteralFactory();
@@ -862,7 +861,7 @@ public abstract class AbstractSQLQuerying
         Predicate<Composite> expression,
         Boolean negationActive,
         SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition,
+        BooleanExpression entityTypeCondition,
         Map<String, Object> variables,
         List<Object> values,
         List<Integer> valueSQLTypes
@@ -895,7 +894,7 @@ public abstract class AbstractSQLQuerying
 
     protected QuerySpecificationBuilder selectAllEntitiesOfCorrectType(
         SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition
+        BooleanExpression entityTypeCondition
     )
     {
         TableReferenceFactory t = vendor.getTableReferenceFactory();
@@ -918,7 +917,7 @@ public abstract class AbstractSQLQuerying
         final MatchesPredicate predicate,
         final Boolean negationActive,
         final SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition,
+        BooleanExpression entityTypeCondition,
         final Map<String, Object> variables, final List<Object> values,
         final List<Integer> valueSQLTypes
     )
@@ -964,7 +963,7 @@ public abstract class AbstractSQLQuerying
     protected QueryBuilder processComparisonPredicate(
         final ComparisonPredicate<?> predicate,
         final Boolean negationActive, final SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition,
+        BooleanExpression entityTypeCondition,
         final Map<String, Object> variables,
         final List<Object> values, final List<Integer> valueSQLTypes
     )
@@ -1018,7 +1017,7 @@ public abstract class AbstractSQLQuerying
     protected QueryBuilder processManyAssociationContainsPredicate(
         final ManyAssociationContainsPredicate<?> predicate, final Boolean negationActive,
         final SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition,
+        BooleanExpression entityTypeCondition,
         Map<String, Object> variables,
         final List<Object> values, final List<Integer> valueSQLTypes
     )
@@ -1073,7 +1072,7 @@ public abstract class AbstractSQLQuerying
     protected QueryBuilder processPropertyNullPredicate(
         final PropertyNullPredicate<?> predicate,
         final Boolean negationActive, final SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition
+        BooleanExpression entityTypeCondition
     )
     {
         return this.singleQuery(
@@ -1091,7 +1090,7 @@ public abstract class AbstractSQLQuerying
     protected QueryBuilder processPropertyNotNullPredicate(
         PropertyNotNullPredicate<?> predicate,
         boolean negationActive, SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition
+        BooleanExpression entityTypeCondition
     )
     {
         return this.singleQuery(
@@ -1109,7 +1108,7 @@ public abstract class AbstractSQLQuerying
     protected QueryBuilder processAssociationNullPredicate(
         final AssociationNullPredicate<?> predicate,
         final Boolean negationActive, final SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition
+        BooleanExpression entityTypeCondition
     )
     {
         return this.singleQuery(
@@ -1127,7 +1126,7 @@ public abstract class AbstractSQLQuerying
     protected QueryBuilder processAssociationNotNullPredicate(
         final AssociationNotNullPredicate<?> predicate,
         final Boolean negationActive, final SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition
+        BooleanExpression entityTypeCondition
     )
     {
         return this.singleQuery(
@@ -1145,7 +1144,7 @@ public abstract class AbstractSQLQuerying
     protected QueryBuilder processContainsPredicate(
         final ContainsPredicate<?> predicate,
         final Boolean negationActive, final SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition,
+        BooleanExpression entityTypeCondition,
         final Map<String, Object> variables,
         final List<Object> values, final List<Integer> valueSQLTypes
     )
@@ -1205,7 +1204,7 @@ public abstract class AbstractSQLQuerying
 
     protected QueryBuilder finalizeContainsQuery(
         SQLVendor vendor, QuerySpecification contains,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition,
+        BooleanExpression entityTypeCondition,
         Boolean negationActive
     )
     {
@@ -1230,7 +1229,7 @@ public abstract class AbstractSQLQuerying
     protected QueryBuilder processContainsAllPredicate(
         final ContainsAllPredicate<?> predicate, final Boolean negationActive,
         final SQLVendor vendor,
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition,
+        BooleanExpression entityTypeCondition,
         final Map<String, Object> variables, final List<Object> values,
         final List<Integer> valueSQLTypes
     )
@@ -1305,7 +1304,7 @@ public abstract class AbstractSQLQuerying
         Boolean includeLastAssoPathTable, //
         Boolean negationActive, //
         SQLVendor vendor, //
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition, //
+        BooleanExpression entityTypeCondition, //
         WhereClauseProcessor whereClauseGenerator//
     )
     {
@@ -1322,7 +1321,7 @@ public abstract class AbstractSQLQuerying
         Boolean includeLastAssoPathTable, //
         Boolean negationActive, //
         SQLVendor vendor, //
-        org.sql.generation.api.grammar.booleans.BooleanExpression entityTypeCondition, //
+        BooleanExpression entityTypeCondition, //
         WhereClauseProcessor whereClauseGenerator//
     )
     {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLStartup.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLStartup.java b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLStartup.java
index 1df5642..e2d2cc6 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLStartup.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/AbstractSQLStartup.java
@@ -48,7 +48,6 @@ import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
-import javax.annotation.PostConstruct;
 import javax.sql.DataSource;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.common.QualifiedName;
@@ -78,27 +77,27 @@ import org.apache.polygene.index.sql.support.common.RebuildingStrategy;
 import org.apache.polygene.index.sql.support.common.ReindexingStrategy;
 import org.apache.polygene.library.sql.common.SQLConfiguration;
 import org.apache.polygene.library.sql.common.SQLUtil;
+import org.apache.polygene.library.sql.generator.grammar.builders.definition.TableElementListBuilder;
+import org.apache.polygene.library.sql.generator.grammar.common.datatypes.SQLDataType;
+import org.apache.polygene.library.sql.generator.grammar.definition.table.AutoGenerationPolicy;
+import org.apache.polygene.library.sql.generator.grammar.definition.table.ConstraintCharacteristics;
+import org.apache.polygene.library.sql.generator.grammar.definition.table.ReferentialAction;
+import org.apache.polygene.library.sql.generator.grammar.definition.table.UniqueSpecification;
+import org.apache.polygene.library.sql.generator.grammar.factories.DataTypeFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.DefinitionFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.LiteralFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.ModificationFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.QueryFactory;
+import org.apache.polygene.library.sql.generator.grammar.factories.TableReferenceFactory;
+import org.apache.polygene.library.sql.generator.grammar.manipulation.DropBehaviour;
+import org.apache.polygene.library.sql.generator.grammar.manipulation.ObjectType;
+import org.apache.polygene.library.sql.generator.grammar.modification.DeleteBySearch;
+import org.apache.polygene.library.sql.generator.grammar.modification.InsertStatement;
+import org.apache.polygene.library.sql.generator.grammar.query.QueryExpression;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
 import org.apache.polygene.spi.entitystore.EntityStoreException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.sql.generation.api.grammar.builders.definition.TableElementListBuilder;
-import org.sql.generation.api.grammar.common.datatypes.SQLDataType;
-import org.sql.generation.api.grammar.definition.table.AutoGenerationPolicy;
-import org.sql.generation.api.grammar.definition.table.ConstraintCharacteristics;
-import org.sql.generation.api.grammar.definition.table.ReferentialAction;
-import org.sql.generation.api.grammar.definition.table.UniqueSpecification;
-import org.sql.generation.api.grammar.factories.DataTypeFactory;
-import org.sql.generation.api.grammar.factories.DefinitionFactory;
-import org.sql.generation.api.grammar.factories.LiteralFactory;
-import org.sql.generation.api.grammar.factories.ModificationFactory;
-import org.sql.generation.api.grammar.factories.QueryFactory;
-import org.sql.generation.api.grammar.factories.TableReferenceFactory;
-import org.sql.generation.api.grammar.manipulation.DropBehaviour;
-import org.sql.generation.api.grammar.manipulation.ObjectType;
-import org.sql.generation.api.grammar.modification.DeleteBySearch;
-import org.sql.generation.api.grammar.modification.InsertStatement;
-import org.sql.generation.api.grammar.query.QueryExpression;
-import org.sql.generation.api.vendor.SQLVendor;
 
 import static org.apache.polygene.index.sql.support.common.DBNames.ALL_QNAMES_TABLE_NAME;
 import static org.apache.polygene.index.sql.support.common.DBNames.ALL_QNAMES_TABLE_PK_COLUMN_NAME;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
index e7971dc..58869a6 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/polygene/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
@@ -31,16 +31,15 @@ import org.apache.polygene.index.sql.assembly.PostgreSQLIndexQueryAssembler;
 import org.apache.polygene.index.sql.support.common.DBNames;
 import org.apache.polygene.index.sql.support.common.GenericDatabaseExplorer;
 import org.apache.polygene.index.sql.support.common.GenericDatabaseExplorer.DatabaseProcessorAdapter;
-import org.apache.polygene.index.sql.support.postgresql.PostgreSQLAppStartup;
-import org.apache.polygene.test.internal.DockerRule;
 import org.apache.polygene.library.sql.common.SQLConfiguration;
 import org.apache.polygene.library.sql.common.SQLUtil;
+import org.apache.polygene.library.sql.generator.vendor.PostgreSQLVendor;
+import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.internal.DockerRule;
 import org.junit.Assert;
 import org.junit.ClassRule;
 import org.junit.Test;
-import org.sql.generation.api.vendor.PostgreSQLVendor;
-import org.sql.generation.api.vendor.SQLVendorProvider;
 
 public class PostgreSQLDBIntegrityTest
     extends AbstractPolygeneTest
@@ -48,14 +47,14 @@ public class PostgreSQLDBIntegrityTest
     @ClassRule
     public static final DockerRule DOCKER = new DockerRule( "postgres", 3000L, "PostgreSQL init process complete; ready for start up." );
 
-    public static interface TestEntity
+    public interface TestEntity
         extends EntityComposite
     {
         @UseDefaults
-        public Property<String> testString();
+        Property<String> testString();
 
         @UseDefaults
-        public Property<Integer> testInt();
+        Property<Integer> testInt();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/Typeable.java
----------------------------------------------------------------------
diff --git a/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/Typeable.java b/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/Typeable.java
new file mode 100644
index 0000000..40988a5
--- /dev/null
+++ b/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/Typeable.java
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.library.sql.generator;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * The {@link Object#getClass()} method returns the actual class of the object. Sometimes, that is not what is wanted;
+ * instead it would be good to know which API interface the object implements. Let's say we have a API interface
+ * hierarchy, and we know that each object implements only one specific interface (it may implement more, but all others
+ * must be then super-interface of the actual implemented one). Then we have a mapping from types of interfaces to some
+ * other things, like algorithms or some other functionality. We can not use {@link Map#get(Object)} or
+ * {@link Map#containsKey(Object)} methods for the result of {@link Object#getClass()}, since we would much rather use
+ * API interfaces than actual implementing classes as keys. And because of that, each time, we need to iterate through
+ * whole map, and check for each key that whether the specified object is instance of this key. In other words, quite
+ * inefficient.
+ * </p>
+ * <p>
+ * <p>
+ * This is when this interface comes to aid. It provides a method returning an API interface/class, which is implemented
+ * by the implementation. Then one can use the {@link Map#get(Object)} and {@link Map#containsKey(Object)} methods in
+ * order to retrieve the object associated with specific API interface, without the need to iterate through whole map.
+ * </p>
+ *
+ * @author Stanislav Muhametsin
+ */
+public interface Typeable<BaseType>
+{
+
+    /**
+     * Returns the API interface/class, which is implemented by this object.
+     *
+     * @return The API interface/class, which is implemented by this object.
+     */
+    Class<? extends BaseType> getImplementedType();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/BetweenPredicate.java
----------------------------------------------------------------------
diff --git a/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/BetweenPredicate.java b/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/BetweenPredicate.java
new file mode 100644
index 0000000..15ca4be
--- /dev/null
+++ b/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/BetweenPredicate.java
@@ -0,0 +1,46 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.library.sql.generator.grammar.booleans;
+
+import org.apache.polygene.library.sql.generator.grammar.common.NonBooleanExpression;
+
+/**
+ * The interface for syntax element representing SQL expression {@code BETWEEN }x {@code AND} y.
+ *
+ * @author Stanislav Muhametsin
+ */
+public interface BetweenPredicate
+    extends MultiPredicate
+{
+
+    /**
+     * Returns the minimum value (the expression on the left side of {@code AND}).
+     *
+     * @return The minimum value.
+     */
+    NonBooleanExpression getMinimum();
+
+    /**
+     * Returns the maxmimum value (the expression on the right side of {@code AND}).
+     *
+     * @return The maximum value.
+     */
+    NonBooleanExpression getMaximum();
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/a36086b6/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/BinaryPredicate.java
----------------------------------------------------------------------
diff --git a/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/BinaryPredicate.java b/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/BinaryPredicate.java
new file mode 100644
index 0000000..64a8edc
--- /dev/null
+++ b/libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/BinaryPredicate.java
@@ -0,0 +1,46 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.library.sql.generator.grammar.booleans;
+
+import org.apache.polygene.library.sql.generator.grammar.common.NonBooleanExpression;
+
+/**
+ * A common interface for all boolean expressions taking two value expressions and having some operator between them.
+ *
+ * @author Stanislav Muhametsin
+ */
+public interface BinaryPredicate
+    extends Predicate
+{
+
+    /**
+     * Returns the expression on the left side of the operator.
+     *
+     * @return The expression on the left side of the operator.
+     */
+    NonBooleanExpression getLeft();
+
+    /**
+     * Returns the expression on the right side of the operator.
+     *
+     * @return The expression on the right side of the operator.
+     */
+    NonBooleanExpression getRight();
+}


Mime
View raw message