You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2017/07/17 14:00:05 UTC

[2/9] polygene-java git commit: Rename entitystore-sql to entitystore-sqlkv

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
new file mode 100644
index 0000000..daa9949
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
@@ -0,0 +1,115 @@
+/*
+ *  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.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.common.SQLConfiguration;
+import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+import org.junit.ClassRule;
+
+import static org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class PostgreSQLEntityStoreTest
+    extends AbstractEntityStoreTest
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "postgres",
+                                                            3000L,
+                                                            "PostgreSQL init process complete; ready for start up." );
+
+    @Override
+    // START SNIPPET: assembly
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        // END SNIPPET: assembly
+        super.assemble( module );
+        ModuleAssembly config = module.layer().module( "config" );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
+
+        // START SNIPPET: assembly
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "postgresql-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "postgresql-datasource-service" )
+            .identifiedBy( "postgresql-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new PostgreSQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+        // END SNIPPET: assembly
+        String host = DOCKER.getDockerHost();
+        int port = DOCKER.getExposedContainerPort( "5432/tcp" );
+        config.forMixin( DataSourceConfiguration.class ).declareDefaults()
+              .url().set( "jdbc:postgresql://" + host + ":" + port + "/jdbc_test_db" );
+        // START SNIPPET: assembly
+    }
+    // END SNIPPET: assembly
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork(
+            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
+        );
+        try
+        {
+            SQLConfiguration config = uow.get( SQLConfiguration.class, DEFAULT_ENTITYSTORE_IDENTITY );
+            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
+            connection.setAutoCommit( false );
+            String schemaName = config.schemaName().get();
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "DROP SCHEMA \"%s\" CASCADE", schemaName ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
new file mode 100644
index 0000000..d1dd952
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
@@ -0,0 +1,111 @@
+/*
+ *  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.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.service.ServiceFinder;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.common.SQLConfiguration;
+import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.ClassRule;
+
+import static org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class PostgreSQLEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "postgres",
+                                                            3000L,
+                                                            "PostgreSQL init process complete; ready for start up." );
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "postgresql-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "postgresql-datasource-service" )
+            .identifiedBy( "postgresql-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new PostgreSQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        String host = DOCKER.getDockerHost();
+        int port = DOCKER.getExposedContainerPort( "5432/tcp" );
+        configModule.forMixin( DataSourceConfiguration.class ).declareDefaults()
+                    .url().set( "jdbc:postgresql://" + host + ":" + port + "/jdbc_test_db" );
+        // START SNIPPET: assembly
+    }
+    // END SNIPPET: assembly
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
+        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
+        ServiceFinder serviceFinder = storageModule.serviceFinder();
+        UnitOfWork uow = uowf.newUnitOfWork(
+            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
+                                           );
+        try
+        {
+            SQLConfiguration config = uow.get( SQLConfiguration.class, DEFAULT_ENTITYSTORE_IDENTITY );
+            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
+            connection.setAutoCommit( false );
+            String schemaName = config.schemaName().get();
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "DROP SCHEMA \"%s\" CASCADE", schemaName ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
new file mode 100644
index 0000000..83e8a21
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
@@ -0,0 +1,75 @@
+/*
+ *  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.entitystore.sql;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.SQLiteEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+import org.junit.BeforeClass;
+
+import static org.apache.polygene.test.util.Assume.assumeNoIbmJdk;
+
+public class SQLiteEntityStoreTest extends AbstractEntityStoreTest
+{
+    @BeforeClass
+    public static void beforeClass_IBMJDK()
+    {
+        assumeNoIbmJdk();
+    }
+
+    @Override
+    // START SNIPPET: assembly
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        // END SNIPPET: assembly
+        super.assemble( module );
+        ModuleAssembly config = module.layer().module( "config" );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
+
+        // START SNIPPET: assembly
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "sqlite-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "sqlite-datasource-service" )
+            .identifiedBy( "sqlite-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new SQLiteEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+    }
+    // END SNIPPET: assembly
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
new file mode 100644
index 0000000..6dc5fbe
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
@@ -0,0 +1,65 @@
+/*
+ *  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.entitystore.sql;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.SQLiteEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.BeforeClass;
+
+import static org.apache.polygene.test.util.Assume.assumeNoIbmJdk;
+
+public class SQLiteEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @BeforeClass
+    public static void beforeClass_IBMJDK()
+    {
+        assumeNoIbmJdk();
+    }
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "sqlite-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "sqlite-datasource-service" )
+            .identifiedBy( "sqlite-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new SQLiteEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/derby-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/derby-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/derby-datasource.properties
new file mode 100644
index 0000000..35261ab
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/derby-datasource.properties
@@ -0,0 +1,25 @@
+#
+#  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.
+#
+#
+#
+
+enabled=true
+url=jdbc:derby:memory:testdb;create=true
+driver=org.apache.derby.jdbc.EmbeddedDriver
+username=
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/h2-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/h2-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/h2-datasource.properties
new file mode 100644
index 0000000..74abf51
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/h2-datasource.properties
@@ -0,0 +1,25 @@
+#
+#  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.
+#
+#
+#
+
+enabled=true
+url=jdbc:h2:mem:test
+driver=org.h2.Driver
+username=
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/logback.xml b/extensions/entitystore-sqlkv/src/test/resources/logback.xml
new file mode 100644
index 0000000..03fb4dd
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/logback.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  ~
+  ~
+  -->
+<configuration>
+
+    <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
+        <layout class="ch.qos.logback.classic.PatternLayout">
+            <Pattern>[@%-10thread] %-5level %logger{42} - %msg%n</Pattern>
+        </layout>
+    </appender>
+
+    <root level="info">
+        <appender-ref ref="stdout" />
+    </root>
+
+    <logger name="org.apache.polygene.entitystore.sql" level="debug"/>
+
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/mysql-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/mysql-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/mysql-datasource.properties
new file mode 100644
index 0000000..a2f4175
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/mysql-datasource.properties
@@ -0,0 +1,25 @@
+#
+#  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.
+#
+#
+#
+
+enabled=true
+#url=jdbc:mysql://localhost:3306/jdbc_test_db?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true
+driver=com.mysql.cj.jdbc.Driver
+username=root
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/postgresql-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/postgresql-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/postgresql-datasource.properties
new file mode 100644
index 0000000..bdda284
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/postgresql-datasource.properties
@@ -0,0 +1,24 @@
+#
+#  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.
+#
+#
+#
+
+enabled=true
+driver=org.postgresql.Driver
+username=jdbc_test_login
+password=password

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/sqlite-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/sqlite-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/sqlite-datasource.properties
new file mode 100644
index 0000000..17e52b5
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/sqlite-datasource.properties
@@ -0,0 +1,25 @@
+#
+#  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.
+#
+#
+#
+
+enabled=true
+url=jdbc:sqlite::memory:
+driver=org.sqlite.JDBC
+username=
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/indexing-sql/src/docs/index-sql.txt
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/docs/index-sql.txt b/extensions/indexing-sql/src/docs/index-sql.txt
index 7de12dd..aa9f56d 100644
--- a/extensions/indexing-sql/src/docs/index-sql.txt
+++ b/extensions/indexing-sql/src/docs/index-sql.txt
@@ -28,7 +28,7 @@ source=extensions/indexing-sql/dev-status.xml
 This extension fully leverage the <<library-sql>> meaning that you must use it to assemble your DataSource and that you
 get <<library-circuitbreaker,Circuit Breaker>> and <<library-jmx, JMX>> integration for free.
 
-TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sql>> and
+TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sqlkv>> and
 <<extension-indexing-sql>>.
 
 The following SQL databases are supported:

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/libraries/sql/src/docs/sql.txt
----------------------------------------------------------------------
diff --git a/libraries/sql/src/docs/sql.txt b/libraries/sql/src/docs/sql.txt
index 1021c6a..4ffea6b 100644
--- a/libraries/sql/src/docs/sql.txt
+++ b/libraries/sql/src/docs/sql.txt
@@ -31,7 +31,7 @@ The SQL Library provides facilities for working with SQL databases.
 The center piece is the DataSource support that comes with
 <<library-circuitbreaker>> and <<library-jmx>> support.
 
-TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sql>> and
+TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sqlkv>> and
 <<extension-indexing-sql>>.
 
 Moreover, supplementary libraries helps dealing with different connection pool implementations and schema migrations.

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/manual/src/docs/userguide/extensions.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/userguide/extensions.txt b/manual/src/docs/userguide/extensions.txt
index 44bfd3f..928b90e 100644
--- a/manual/src/docs/userguide/extensions.txt
+++ b/manual/src/docs/userguide/extensions.txt
@@ -105,7 +105,7 @@ include::../../../../extensions/entitystore-riak/src/docs/es-riak.txt[]
 
 :leveloffset: 2
 
-include::../../../../extensions/entitystore-sql/src/docs/es-sql.txt[]
+include::../../../../extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt[]
 
 :leveloffset: 2
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/manual/src/docs/website/samples.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/website/samples.txt b/manual/src/docs/website/samples.txt
index 191b00f..31232eb 100644
--- a/manual/src/docs/website/samples.txt
+++ b/manual/src/docs/website/samples.txt
@@ -65,7 +65,7 @@ https://github.com/apache/polygene-java/tree/develop/samples/rental[Browse Sourc
 
 NOTE: This sample use PostgreSQL and drop all of its data once run in order to be runnable multiple times.
 
-Sample of how to fully use Polygene™ SQL support : <<library-sql>>, <<extension-es-sql>> and <<extension-indexing-sql>>.
+Sample of how to fully use Polygene™ SQL support : <<library-sql>>, <<extension-es-sqlkv>> and <<extension-indexing-sql>>.
 
 https://github.com/apache/polygene-java/tree/develop/samples/sql-support[Browse Source]
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/samples/sql-support/build.gradle
----------------------------------------------------------------------
diff --git a/samples/sql-support/build.gradle b/samples/sql-support/build.gradle
index 1be908e..19acd12 100644
--- a/samples/sql-support/build.gradle
+++ b/samples/sql-support/build.gradle
@@ -30,7 +30,7 @@ dependencies {
   implementation polygene.core.bootstrap
   implementation polygene.library( 'sql-dbcp' )
   implementation polygene.extension( 'entitystore-preferences' )
-  implementation polygene.extension( 'entitystore-sql' )
+  implementation polygene.extension( 'entitystore-sqlkv' )
   implementation polygene.extension( 'indexing-sql' )
 
   runtimeOnly polygene.core.runtime

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 3c44077..92e3bf0 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -67,7 +67,7 @@ include 'core:api',
         'extensions:entitystore-preferences',
         'extensions:entitystore-redis',
         'extensions:entitystore-riak',
-        'extensions:entitystore-sql',
+        'extensions:entitystore-sqlkv',
         'extensions:indexing-elasticsearch',
         'extensions:indexing-rdf',
         'extensions:indexing-solr',

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/tests/performance/build.gradle
----------------------------------------------------------------------
diff --git a/tests/performance/build.gradle b/tests/performance/build.gradle
index 1ff9b45..c9da41d 100644
--- a/tests/performance/build.gradle
+++ b/tests/performance/build.gradle
@@ -34,7 +34,7 @@ dependencies {
   perfImplementation polygene.library( 'sql-dbcp' )
   perfImplementation polygene.extension( 'entitystore-memory' )
   perfImplementation polygene.extension( 'entitystore-jdbm' )
-  perfImplementation polygene.extension( 'entitystore-sql' )
+  perfImplementation polygene.extension( 'entitystore-sqlkv' )
   perfImplementation polygene.extension( 'cache-ehcache' )
   perfImplementation polygene.extension( 'indexing-rdf' )
   perfImplementation libraries.derby