Skip to content

Commit e81b867

Browse files
committed
Rename to SQL Templates
1 parent 3d4ac5d commit e81b867

File tree

54 files changed

+207
-195
lines changed

Some content is hidden

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

54 files changed

+207
-195
lines changed

pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,11 @@
104104

105105
<modules>
106106
<module>vertx-sql-client</module>
107-
<module>vertx-sql-client-template</module>
108107
<module>vertx-pg-client</module>
109108
<module>vertx-mysql-client</module>
110109
<module>vertx-mssql-client</module>
111110
<module>vertx-db2-client</module>
111+
<module>vertx-sql-templates</module>
112112
</modules>
113113

114-
115-
116114
</project>

vertx-sql-client-template/src/test/resources/META-INF/services/io.vertx.codegen.GeneratorLoader

Lines changed: 0 additions & 1 deletion
This file was deleted.

vertx-sql-client-template/src/test/resources/META-INF/vertx/json-mappers.properties

Lines changed: 0 additions & 18 deletions
This file was deleted.

vertx-sql-client-template/pom.xml renamed to vertx-sql-templates/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
<version>4.0.0-SNAPSHOT</version>
2626
</parent>
2727

28-
<artifactId>vertx-sql-client-template</artifactId>
28+
<artifactId>vertx-sql-templates</artifactId>
2929

30-
<name>Vertx SQL Client template</name>
30+
<name>Vertx SQL Templates</name>
3131
<url>https://github.com/eclipse-vertx/vertx-sql-client</url>
32-
<description>The Reactive SQL Client template</description>
32+
<description>Vert.x SQL Templates</description>
3333

3434
<properties>
3535
<docs.dir>${project.basedir}/src/main/docs</docs.dir>

vertx-sql-client-template/src/main/asciidoc/index.adoc renamed to vertx-sql-templates/src/main/asciidoc/index.adoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
= Client SQL templates
1+
= SQL Templates
22
:toc:
33

4-
SQL client templates is a small library designed to facilitate the execution of SQL queries.
4+
SQL Templates is a small library designed to facilitate the execution of SQL queries.
55

66
== Usage
77

8-
To use client SQL templates add the following dependency to the _dependencies_ section of your build descriptor:
8+
To use SQL Templates add the following dependency to the _dependencies_ section of your build descriptor:
99

1010
* Maven (in your `pom.xml`):
1111

@@ -30,17 +30,17 @@ dependencies {
3030

3131
Here is the simplest way to use an SQL template.
3232

33-
SQL template consumes _named_ parameters and thus takes (by default) a map as parameters sources instead of a tuple.
33+
A SQL template consumes _named_ parameters and thus takes (by default) a map as parameters sources instead of a tuple.
3434

35-
SQL template produces (by default) a `RowSet<Row>` like a client `PreparedQuery`. In fact the template is a thin
35+
A SQL template produces (by default) a `RowSet<Row>` like a client `PreparedQuery`. In fact the template is a thin
3636
wrapper for a `PreparedQuery`.
3737

3838
[source,$lang]
3939
----
4040
{@link examples.TemplateExamples#queryExample}
4141
----
4242

43-
When you need to perform an insert or update operation and you do not care of the result, you can use {@link io.vertx.sqlclient.template.SqlTemplate#forUpdate} instead:
43+
When you need to perform an insert or update operation and you do not care of the result, you can use {@link io.vertx.sqltemplates.SqlTemplate#forUpdate} instead:
4444

4545
[source,$lang]
4646
----
@@ -188,7 +188,7 @@ public class LocalDateTimePojo {
188188

189189
== Mapping with Vert.x data objects
190190

191-
The SQL template component can generate mapping function for Vert.x data objects.
191+
The SQL Templates component can generate mapping function for Vert.x data objects.
192192

193193
A Vert.x data object is a simple Java bean class annotated with the `@DataObject` annotation.
194194

@@ -199,7 +199,7 @@ A Vert.x data object is a simple Java bean class annotated with the `@DataObject
199199

200200
=== Code generation
201201

202-
Any data object annotated by {@link io.vertx.sqlclient.template.annotations.RowMapped} or {@link io.vertx.sqlclient.template.annotations.ParametersMapped}
202+
Any data object annotated by {@link io.vertx.sqltemplates.annotations.RowMapped} or {@link io.vertx.sqltemplates.annotations.ParametersMapped}
203203
will trigger the generation of a corresponding mapper class.
204204

205205
The _codegen_ annotation processor generates these classes at compilation time. It is a feature of the Java
@@ -255,7 +255,7 @@ explicitly, for instance in Maven:
255255

256256
=== Row mapping
257257

258-
You can generate a row mapper by annotating your data object by {@link io.vertx.sqlclient.template.annotations.RowMapped}.
258+
You can generate a row mapper by annotating your data object by {@link io.vertx.sqltemplates.annotations.RowMapped}.
259259

260260
[source,$lang]
261261
----
@@ -265,7 +265,7 @@ You can generate a row mapper by annotating your data object by {@link io.vertx.
265265
By default each column name is bound after the data object properties, e.g the `userName` property binds to
266266
the `userName` column.
267267

268-
You can use custom names thanks to the {@link io.vertx.sqlclient.template.annotations.Column}
268+
You can use custom names thanks to the {@link io.vertx.sqltemplates.annotations.Column}
269269
annotation.
270270

271271
[source,$lang]
@@ -284,7 +284,7 @@ The generated mapper can be used to perform row mapping like explained in <<row_
284284

285285
=== Parameters mapping
286286

287-
You can generate a parameters mapper by annotating your data object by {@link io.vertx.sqlclient.template.annotations.ParametersMapped}.
287+
You can generate a parameters mapper by annotating your data object by {@link io.vertx.sqltemplates.annotations.ParametersMapped}.
288288

289289
[source,$lang]
290290
----
@@ -294,7 +294,7 @@ You can generate a parameters mapper by annotating your data object by {@link io
294294
By default each parameter is bound after the data object properties, e.g the `userName` property binds to
295295
the `userName` parameter.
296296

297-
You can use custom names thanks to the {@link io.vertx.sqlclient.template.annotations.TemplateParameter}
297+
You can use custom names thanks to the {@link io.vertx.sqltemplates.annotations.TemplateParameter}
298298
annotation.
299299

300300
[source,$lang]

vertx-sql-client-template/src/main/java/examples/TemplateExamples.java renamed to vertx-sql-templates/src/main/java/examples/TemplateExamples.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import io.vertx.docgen.Source;
77
import io.vertx.sqlclient.Row;
88
import io.vertx.sqlclient.SqlClient;
9-
import io.vertx.sqlclient.template.SqlTemplate;
10-
import io.vertx.sqlclient.template.annotations.Column;
11-
import io.vertx.sqlclient.template.annotations.ParametersMapped;
12-
import io.vertx.sqlclient.template.annotations.RowMapped;
13-
import io.vertx.sqlclient.template.annotations.TemplateParameter;
9+
import io.vertx.sqltemplates.SqlTemplate;
10+
import io.vertx.sqltemplates.annotations.Column;
11+
import io.vertx.sqltemplates.annotations.ParametersMapped;
12+
import io.vertx.sqltemplates.annotations.RowMapped;
13+
import io.vertx.sqltemplates.annotations.TemplateParameter;
1414

1515
import java.util.Collections;
1616
import java.util.HashMap;

vertx-sql-client-template/src/main/java/io/vertx/sqlclient/template/SqlTemplate.java renamed to vertx-sql-templates/src/main/java/io/vertx/sqltemplates/SqlTemplate.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.vertx.sqlclient.template;
1+
package io.vertx.sqltemplates;
22

33
import io.vertx.codegen.annotations.GenIgnore;
44
import io.vertx.codegen.annotations.VertxGen;
@@ -10,7 +10,7 @@
1010
import io.vertx.sqlclient.SqlClient;
1111
import io.vertx.sqlclient.SqlResult;
1212
import io.vertx.sqlclient.impl.SqlClientInternal;
13-
import io.vertx.sqlclient.template.impl.SqlTemplateImpl;
13+
import io.vertx.sqltemplates.impl.SqlTemplateImpl;
1414

1515
import java.util.List;
1616
import java.util.Map;
@@ -40,7 +40,7 @@ public interface SqlTemplate<I, R> {
4040
* @return the template
4141
*/
4242
static SqlTemplate<Map<String, Object>, RowSet<Row>> forQuery(SqlClient client, String template) {
43-
io.vertx.sqlclient.template.impl.SqlTemplate sqlTemplate = io.vertx.sqlclient.template.impl.SqlTemplate.create((SqlClientInternal) client, template);
43+
io.vertx.sqltemplates.impl.SqlTemplate sqlTemplate = io.vertx.sqltemplates.impl.SqlTemplate.create((SqlClientInternal) client, template);
4444
return new SqlTemplateImpl<>(client, sqlTemplate, Function.identity(), Function.identity());
4545
}
4646

@@ -52,7 +52,7 @@ static SqlTemplate<Map<String, Object>, RowSet<Row>> forQuery(SqlClient client,
5252
* @return the template
5353
*/
5454
static SqlTemplate<Map<String, Object>, SqlResult<Void>> forUpdate(SqlClient client, String template) {
55-
io.vertx.sqlclient.template.impl.SqlTemplate sqlTemplate = io.vertx.sqlclient.template.impl.SqlTemplate.create((SqlClientInternal) client, template);
55+
io.vertx.sqltemplates.impl.SqlTemplate sqlTemplate = io.vertx.sqltemplates.impl.SqlTemplate.create((SqlClientInternal) client, template);
5656
return new SqlTemplateImpl<>(client, sqlTemplate, query -> query.collecting(SqlTemplateImpl.NULL_COLLECTOR), Function.identity());
5757
}
5858

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.vertx.sqlclient.template.annotations;
1+
package io.vertx.sqltemplates.annotations;
22

33
import java.lang.annotation.ElementType;
44
import java.lang.annotation.Retention;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.vertx.sqlclient.template.annotations;
1+
package io.vertx.sqltemplates.annotations;
22

33
import io.vertx.codegen.Case;
44
import io.vertx.codegen.LowerCamelCase;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.vertx.sqlclient.template.annotations;
1+
package io.vertx.sqltemplates.annotations;
22

33
import io.vertx.codegen.Case;
44
import io.vertx.codegen.LowerCamelCase;

0 commit comments

Comments
 (0)