Skip to content

Commit 758962a

Browse files
philipgreatPhilip Z
andauthored
Prepare TeaQL Java 1.548 release (#101)
* chore(release): prepare TeaQL Java 1.548 * chore: exclude SQLite test artifact from release * fix(runtime): assemble Business ID infrastructure explicitly --------- Co-authored-by: Philip Z <hello@teaql.io>
1 parent d88eeb1 commit 758962a

47 files changed

Lines changed: 141 additions & 46 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎examples/business-id-runtime/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.teaql</groupId>
88
<artifactId>teaql-java-parent</artifactId>
9-
<version>1.547-RELEASE</version>
9+
<version>1.548-RELEASE</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212
<artifactId>teaql-business-id-example</artifactId>

‎examples/business-id-runtime/src/test/java/io/teaql/examples/businessid/BusinessIdRuntimeExampleTest.java‎

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import io.teaql.core.BaseEntity;
55
import io.teaql.core.EntityKey;
66
import io.teaql.core.UserContext;
7+
import io.teaql.core.SchemaExecutor;
78
import io.teaql.core.businessid.*;
89
import io.teaql.core.meta.EntityDescriptor;
910
import io.teaql.core.meta.EntityMetaFactory;
@@ -137,7 +138,14 @@ public void sqliteAllocatorIsExplicitCrossInstanceAndRestartSafe() throws Except
137138
LocalDate.of(2026, 9, 20)));
138139

139140
try (Connection schemaConnection = open(databasePath)) {
140-
new JdbcBusinessIdAllocator(database(schemaConnection)).ensureSchema(null);
141+
JdbcBusinessIdAllocator allocator =
142+
new JdbcBusinessIdAllocator(database(schemaConnection));
143+
UserContext context = context(LocalDate.of(2026, 9, 20), allocator);
144+
context.putAttribute(
145+
SchemaExecutor.class.getName(),
146+
noOpSchemaExecutor());
147+
context.ensureSchema();
148+
Assert.assertNotNull(context.businessIds());
141149
}
142150

143151
CountDownLatch start = new CountDownLatch(1);
@@ -179,7 +187,12 @@ public void sqliteAllocatorIsExplicitCrossInstanceAndRestartSafe() throws Except
179187
}
180188

181189
private static UserContext context(LocalDate date) {
182-
TeaQLRuntime runtime = TeaQLRuntime.builder()
190+
return context(date, null);
191+
}
192+
193+
private static UserContext context(
194+
LocalDate date, JdbcBusinessIdAllocator businessIdInfrastructure) {
195+
TeaQLRuntime.Builder builder = TeaQLRuntime.builder()
183196
.metadata(new EntityMetaFactory() {
184197
@Override
185198
public EntityDescriptor resolveEntityDescriptor(String type) {
@@ -194,8 +207,11 @@ public List<EntityDescriptor> allEntityDescriptors() {
194207
return List.of();
195208
}
196209
})
197-
.executionLogging(false)
198-
.build();
210+
.executionLogging(false);
211+
if (businessIdInfrastructure != null) {
212+
builder.businessIdInfrastructure(businessIdInfrastructure);
213+
}
214+
TeaQLRuntime runtime = builder.build();
199215
DefaultUserContext context = new DefaultUserContext(runtime);
200216
context.putAttribute(BusinessClock.class.getName(),
201217
(BusinessClock) ignored -> date);
@@ -212,6 +228,20 @@ private static Connection open(Path path) throws SQLException {
212228
return connection;
213229
}
214230

231+
private static SchemaExecutor noOpSchemaExecutor() {
232+
return (SchemaExecutor) java.lang.reflect.Proxy.newProxyInstance(
233+
SchemaExecutor.class.getClassLoader(),
234+
new Class<?>[] {SchemaExecutor.class},
235+
(proxy, method, args) -> {
236+
if (method.getName().equals("ensureSchema")) return null;
237+
Class<?> resultType = method.getReturnType();
238+
if (resultType == boolean.class) return false;
239+
if (resultType == int.class) return 0;
240+
if (resultType == long.class) return 0L;
241+
return null;
242+
});
243+
}
244+
215245
private static TeaQLDatabase database(Connection connection) {
216246
return new TeaQLDatabase() {
217247
@Override

‎examples/conformance/lib/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<properties>
1313
<java.version>21</java.version>
1414
<spring-boot.version>4.1.0</spring-boot.version>
15-
<teaql.version>1.547-RELEASE</teaql.version>
15+
<teaql.version>1.548-RELEASE</teaql.version>
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1717
<maven.compiler.parameters>true</maven.compiler.parameters>
1818
</properties>

‎examples/conformance/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<libversion>1.0.0</libversion>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1818
<maven.compiler.parameters>true</maven.compiler.parameters>
19-
<teaql.version>1.547-RELEASE</teaql.version>
19+
<teaql.version>1.548-RELEASE</teaql.version>
2020
</properties>
2121

2222
<repositories>

‎examples/order-management/java-app-console/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<properties>
1212
<maven.compiler.release>21</maven.compiler.release>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14-
<teaql.version>1.547-RELEASE</teaql.version>
14+
<teaql.version>1.548-RELEASE</teaql.version>
1515
</properties>
1616
<dependencies>
1717
<dependency>

‎examples/order-management/java-lib-core/lib/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<properties>
1313
<java.version>21</java.version>
1414
<spring-boot.version>4.1.0</spring-boot.version>
15-
<teaql.version>1.547-RELEASE</teaql.version>
15+
<teaql.version>1.548-RELEASE</teaql.version>
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1717
<maven.compiler.parameters>true</maven.compiler.parameters>
1818
</properties>

‎examples/school-management/lib/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<properties>
1313
<java.version>21</java.version>
1414
<spring-boot.version>4.1.0</spring-boot.version>
15-
<teaql.version>1.547-RELEASE</teaql.version>
15+
<teaql.version>1.548-RELEASE</teaql.version>
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1717
<maven.compiler.parameters>true</maven.compiler.parameters>
1818
</properties>

‎examples/school-management/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<libversion>0.0.1-SNAPSHOT</libversion>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1818
<maven.compiler.parameters>true</maven.compiler.parameters>
19-
<teaql.version>1.547-RELEASE</teaql.version>
19+
<teaql.version>1.548-RELEASE</teaql.version>
2020
</properties>
2121

2222
<repositories>

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.teaql</groupId>
88
<artifactId>teaql-java-parent</artifactId>
9-
<version>1.547-RELEASE</version>
9+
<version>1.548-RELEASE</version>
1010
<packaging>pom</packaging>
1111

1212
<name>teaql-java-parent</name>

‎teaql-android/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>io.teaql</groupId>
99
<artifactId>teaql-java-parent</artifactId>
10-
<version>1.547-RELEASE</version>
10+
<version>1.548-RELEASE</version>
1111
</parent>
1212

1313
<artifactId>teaql-android</artifactId>

0 commit comments

Comments
 (0)