From fd8cfb75fc7f81c10a0ee78889df947a446f57d9 Mon Sep 17 00:00:00 2001 From: Viktoriya Nikolova Date: Thu, 19 Dec 2024 10:48:20 +0100 Subject: [PATCH] fix: formatting of functions, properties, and interface naming --- .../Writerside/topics/DAO-CRUD-Operations.topic | 2 +- .../Writerside/topics/DAO-Table-Types.topic | 4 ++-- .../Writerside/topics/DSL-CRUD-operations.topic | 8 ++++---- .../Writerside/topics/DSL-Joining-tables.topic | 2 +- .../Writerside/topics/DSL-Querying-data.topic | 2 +- documentation-website/Writerside/topics/SQL-Functions.md | 3 ++- documentation-website/Writerside/topics/Transactions.md | 6 +++--- .../Writerside/topics/Working-with-Tables.topic | 6 +++--- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/documentation-website/Writerside/topics/DAO-CRUD-Operations.topic b/documentation-website/Writerside/topics/DAO-CRUD-Operations.topic index 126a0aa06b..bc04c97951 100644 --- a/documentation-website/Writerside/topics/DAO-CRUD-Operations.topic +++ b/documentation-website/Writerside/topics/DAO-CRUD-Operations.topic @@ -210,7 +210,7 @@

Suppose that you want to sort cities by the number of users in each city. To achieve this, you can write a subquery which counts the users in each city and - then order the result by that count.To do so, however, you need to convert the + then order the result by that count. To do so, however, you need to convert the Query diff --git a/documentation-website/Writerside/topics/DAO-Table-Types.topic b/documentation-website/Writerside/topics/DAO-Table-Types.topic index 214967a260..84996293b1 100644 --- a/documentation-website/Writerside/topics/DAO-Table-Types.topic +++ b/documentation-website/Writerside/topics/DAO-Table-Types.topic @@ -75,7 +75,7 @@

- To define multiple columns as part of the primary key and id, use + To define multiple columns as part of the primary key and ID, use CompositeIdTable @@ -83,7 +83,7 @@ .entityId() - . Each component column will be available for CRUD operations either individually (as for any standard column) + .Each component column will be available for CRUD operations either individually (as for any standard column) or all together as part of the id column:

diff --git a/documentation-website/Writerside/topics/DSL-CRUD-operations.topic b/documentation-website/Writerside/topics/DSL-CRUD-operations.topic index 09f9e3f63c..4458cdc357 100644 --- a/documentation-website/Writerside/topics/DSL-CRUD-operations.topic +++ b/documentation-website/Writerside/topics/DSL-CRUD-operations.topic @@ -191,8 +191,8 @@ src="exposed-dsl/src/main/kotlin/org/example/examples/ReadExamples.kt" include-lines="99-100"/>

- Query inherits Iterable so it is possible to traverse it using map() - or forEach(): + Query inherits Iterable so it is possible to traverse it using .map() + or .forEach():

- If none of the optional arguments are provided to .upsert(), and an .onUpdate() block + If none of the optional arguments are provided to .upsert(), and an onUpdate block is omitted, the statements in the body block will be used for both the insert and update parts of the operation. This means that, for example, if a table mapping has columns with default values and these columns are @@ -301,7 +301,7 @@ used for insertion as well as for the update operation.

- If the update operation should differ from the insert operation, then onUpdate() should be + If the update operation should differ from the insert operation, then onUpdate should be provided an argument to set the specific columns to update, as seen in the example below.

If the update operation involves functions that should use the values that would have been inserted, diff --git a/documentation-website/Writerside/topics/DSL-Joining-tables.topic b/documentation-website/Writerside/topics/DSL-Joining-tables.topic index d377897d4c..b527a67cc7 100644 --- a/documentation-website/Writerside/topics/DSL-Joining-tables.topic +++ b/documentation-website/Writerside/topics/DSL-Joining-tables.topic @@ -51,7 +51,7 @@ src="exposed-dsl/src/main/kotlin/org/example/examples/JoinExamples.kt" include-lines="39-42"/>

- This is equivalent to using a join() with a JoinType.INNER: + This is equivalent to using a .join() with a JoinType.INNER:

.groupBy() - , define fields and their functions by the select() + , define fields and their functions by the .select() method.

("REPLACE", VarCharColumnType(), FooTable.name, stringParam("foo"), stringParam("bar")) ``` -`CustomFunction` class accepts a function name as a first parameter and the resulting column type as second. After that, you can provide any amount of parameters separated by a comma. +The [`CustomFunction`](https://jetbrains.github.io/Exposed/api/exposed-core/org.jetbrains.exposed.sql/-custom-function/index.html) +class accepts a function name as a first parameter and the resulting column type as second. After that, you can provide any amount of parameters separated by a comma. There are also shortcuts for string, long, and datetime functions: * [`CustomStringFunction`](https://jetbrains.github.io/Exposed/api/exposed-core/org.jetbrains.exposed.sql/-custom-string-function.html) diff --git a/documentation-website/Writerside/topics/Transactions.md b/documentation-website/Writerside/topics/Transactions.md index db61642e06..b9ebc2a6b7 100644 --- a/documentation-website/Writerside/topics/Transactions.md +++ b/documentation-website/Writerside/topics/Transactions.md @@ -328,10 +328,10 @@ interface that allows you to implement your own logic before and after these spe `registerInterceptor()` and `unregisterInterceptor()` can be used to enable and disable a custom interceptor in a single transaction. -To use a custom interceptor that acts on all transactions, extend the +To use a custom interceptor that acts on all transactions, implement the [`GlobalStatementInterceptor`](https://jetbrains.github.io/Exposed/api/exposed-core/org.jetbrains.exposed.sql.statements/-global-statement-interceptor/index.html) -class instead. Exposed uses the Java SPI ServiceLoader to discover and load any implementations of this class. In this -situation, a new file should be created in the *resources* folder named: +interface instead. Exposed uses the Java SPI ServiceLoader to discover and load any implementations of this interface. +In this situation, a new file should be created in the *resources* folder named: ``` META-INF/services/org.jetbrains.exposed.sql.statements.GlobalStatementInterceptor ``` diff --git a/documentation-website/Writerside/topics/Working-with-Tables.topic b/documentation-website/Writerside/topics/Working-with-Tables.topic index 97a5374e83..66eeed02dc 100644 --- a/documentation-website/Writerside/topics/Working-with-Tables.topic +++ b/documentation-website/Writerside/topics/Working-with-Tables.topic @@ -119,19 +119,19 @@
  • - default(defaultValue: T) + .default(defaultValue: T) accepts a value with a type of the column.
  • - defaultExpression(defaultValue: Expression<T>) + .defaultExpression(defaultValue: Expression<T>) accepts an expression.
  • - clientDefault(defaultValue: () -> T) + .clientDefault(defaultValue: () -> T) accepts a function.