Skip to content

Commit 803ec21

Browse files
committed
Misc. copy editing
1 parent 40d8ef0 commit 803ec21

File tree

8 files changed

+28
-28
lines changed

8 files changed

+28
-28
lines changed

Diff for: src/docs/asciidoc/reference/connection/clientinfoproperties.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Client info properties allow you to set properties on a connection for informati
66
[#ref-client-info-jb5]
77
==== Support in Jaybird 5 and earlier
88

9-
Support for client info properties was introduced in Jaybird 2.2, storing properties in the `USER_SESSION` context of `RDB$GET/SET_CONTEXT`.
9+
Support for client info properties was introduced in Jaybird 2.2, storing properties in the `USER_SESSION` context of https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref50/fblangref50-functions.html#fblangref50-functions-workcontext[`RDB$GET/SET_CONTEXT`].
1010
Support is quite limited, allowing you to:
1111

1212
* Set properties individually or collectively using a `Properties` object (`Connection#setClientInfo(String,String)`, `Connection#setClientInfo(Properties)`)
1313
* Clear properties individually (setting them to `null`) (`Connection#setClientInfo(String,String)`
1414
* Get individual properties (`Connection#getClientInfo(String)`)
1515
1616
Properties are always stored in `USER_SESSION`.
17-
Properties are retrieved from `USER_TRANSACTION`, falling back to `USER_SESSION` if the property was not present in `USER_TRANSACTION.
17+
Properties are retrieved from `USER_TRANSACTION`, falling back to `USER_SESSION` if the property was not present in `USER_TRANSACTION`.
1818

1919
Absent is support to:
2020

@@ -93,7 +93,7 @@ The `ClientUser` and `ClientHostname` properties are considered application-spec
9393
If you use a connection pool populated from `org.firebirdsql.ds.FBConnectionPoolDataSource` or `org.firebirdsql.ds.FBXADataSource`, the known properties are reset each time the connection is handed out by the pool.
9494
This assumes the pool uses `getConnection()` from `PooledConnection`/`XAConnection` each time it hands out the connection.
9595
This reset only removes the property name from the list of known properties of the connection, it does not clear the property values from `USER_SESSION`.
96-
If properties contain _sensitive_ values you will need to explicitly clear them.
96+
If properties contain _sensitive_ values, you will need to explicitly clear them.
9797

9898
This reset is not applied when using a connection pool which is populated by different means (e.g. from `DriverManager` or from a normal `javax.sql.DataSource` like `org.firebirdsql.ds.FBSimpleDataSource`).
9999
If your connection pool implementation supports custom code to reset a connection, and you need known properties to reset when a connection is reused, make it call `FirebirdConnection.resetKnownClientInfoProperties()`, or call it yourself:

Diff for: src/docs/asciidoc/reference/connection/datatypebind.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The value of this connection property is a semicolon-separated list of data type
1414

1515
A data type bind definition is of the form `<from-type> TO <to-type>`.
1616
A definition is the same as the second half of a `SET BIND` statement after the `OF`.
17-
See the Firebird documentation of `SET BIND` for more information.
17+
See the Firebird 5.0 documentation of https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref50/fblangref50-management.html#fblangref50-management-setbind[`SET BIND`] for more information.
1818
Invalid values or impossible mappings will result in an error on connect.
1919

2020
When using the `dataTypeBind` connection property in a JDBC URL, the semicolons of the list need to be encoded as `%3B`, as unescaped semicolons in the JDBC URL are an alternative to `&` as the separator between properties.
@@ -28,7 +28,7 @@ String jdbcUrl = "jdbc:firebirdsql://localhost/database?charSet=utf-8"
2828
+ "&dataTypeBind=decfloat to varchar%3Btimestamp with time zone to legacy"
2929
----
3030

31-
When the property is set through a `Properties` object or a `DataSource` configuration, encoding the semicolon is not necessary and will result in errors.
31+
When the property is set through a `Properties` object or a `DataSource` configuration, you should not encode the semicolon as this will result in errors.
3232

3333
For example:
3434

@@ -40,4 +40,4 @@ props.setProperty("dataTypeBind",
4040
"decfloat to varchar;timestamp with time zone to legacy"
4141
----
4242

43-
Values set through this connection property will be the session default configuration, which means that they are retained (or reverted to) when executing `ALTER SESSION RESET`.
43+
Values set through this connection property will be the session default configuration, which means that they are retained (or reverted to) when executing https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref50/fblangref50-management-session-reset.html#fblangref50-management-session-reset-alter[`ALTER SESSION RESET`].

Diff for: src/docs/asciidoc/reference/connection/firebirdautocommit.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ This functionality is experimental, and will remain so unless Firebird changes h
88
99
Incorrect use of this functionality can result in excessive growth of the database due to increases in back-version chains of records, which can also cause performance degradation.
1010
Additionally, when used with an isolation level other than READ COMMITTED, the connection will only see changes committed at the time the initial transaction was started;
11-
the auto-commit barrier will not make new committed changes visible.
11+
the auto-commit barrier will not make new committed changes visible to the current transaction.
1212
====
1313

1414
This option is enabled by specifying the connection property `useFirebirdAutocommit=true`.
1515

1616
With this option, a connection in auto-commit mode will configure the transaction to use `isc_tpb_autocommit`.
17-
This means that Firebird server will internally commit the transaction after each statement completion.
17+
This means that Firebird server will internally commit the transaction after each statement completion using "`__commit retain__`".
1818
Jaybird itself will not commit until connection close (or disabling auto-commit).
1919
The exception is if the statement was of type `isc_info_sql_stmt_ddl`, in that case Jaybird will commit on statement success and rollback on statement failure (just like it does for all statements in normal auto-commit mode).
2020
The reason is that Firebird for some DDL commands only executes at a real commit boundary and relying on the Firebird auto-commit is insufficient.

Diff for: src/docs/asciidoc/reference/connection/processinfo.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Native connections will always report the actual process ID, if a fbclient of Fi
2121
This cannot be overridden using the options below.
2222

2323
Since Firebird 3.0, the `MON$ATTACHMENTS` table also includes the column `MON$CLIENT_VERSION`.
24-
Jaybird will report its full version (e.g. `Jaybird jaybird-5.0.1.java11`).
24+
Jaybird will report its full version (e.g. `Jaybird jaybird-{jaybird-example-version}`).
2525

2626
It is possible to specify the process name and process id in two ways:
2727

Diff for: src/docs/asciidoc/reference/statement/generatedkeys.adoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ Since Jaybird 4.0.8, Jaybird uses a custom parser and no longer requires ANTLR f
2727
If you previously relied on absence of ANTLR to disable generated keys support, the generated keys feature can be disabled by setting <<ref-generatedkeys-config,connection property `generatedKeysEnabled`>> to `disabled`.
2828
****
2929

30-
This functionality is available for `INSERT`, `UPDATE`, `UPDATE OR INSERT` and `DELETE`, and for `MERGE` ([.since]_Firebird 3.0_).
30+
This functionality is available for `INSERT`, `UPDATE`, `UPDATE OR INSERT`, `DELETE`, and -- [.since]_Firebird 3.0_ -- `MERGE`.
3131

3232
Generated keys retrieval modifies the statement to add a `RETURNING`-clause.
3333
Firebird 4.0 and earlier only support `RETURNING` for DML operations that affect a single row.
3434
Attempting to use generated keys retrieval with a statement that affects multiple rows will yield the error _"multiple rows in singleton select"_.
3535

36-
[.since]_Jaybird 5/Firebird 5.0_ Support for multi-row `RETURNING` is introduced in Firebird 5.0.
37-
Support for multi-row `RETURNING` is available in Jaybird 5.
36+
[.since]_Jaybird 5_ [.since]_Firebird 5.0_ Support for multi-row `RETURNING` is introduced in Firebird 5.0.
37+
Support for multi-row `RETURNING` is available since Jaybird 5.
3838

3939
The examples in this section use the following (Firebird 3.0) table:
4040

@@ -150,10 +150,10 @@ The values in the `int[]` parameter are the ordinal positions of the columns as
150150
[WARNING]
151151
====
152152
In Jaybird 3 and earlier, a null or empty array was silently ignored and the statement was executed normally (not producing generated keys).
153-
In Jaybird 4, this behaviour has changed and instead will throw an exception with message _"Generated keys array columnIndexes was empty or null. A non-empty array is required."_
153+
In Jaybird 4, this behaviour has changed and instead will throw an exception with message "`__Generated keys array columnIndexes was empty or null. A non-empty array is required.__`"
154154
155155
In Jaybird 3 and earlier, invalid ordinal positions are ignored and silently dropped: passing `new int[] { 1, 5, 6 }` will work, even if there is no sixth column.
156-
In Jaybird 4, this behavior has changed and instead will throw an exception with message _"Generated keys column position <position> does not exist for table <tablename>. Check DatabaseMetaData.getColumns (column ORDINAL_POSITION) for valid values."_
156+
Since Jaybird 4, this behavior has changed and instead will throw an exception with message "`__Generated keys column position <position> does not exist for table <tablename>. Check DatabaseMetaData.getColumns (column ORDINAL_POSITION) for valid values.__`"
157157
====
158158

159159
[[ref-generatedkeys-examples-column-index]]
@@ -201,7 +201,7 @@ As this is the second column in the result set, it is retrieved from the result
201201
[WARNING]
202202
====
203203
In Jaybird 3 and earlier, the array of indices is sorted in ascending order before use: passing `new int[] { 4, 1, 3 }` will yield columns in order `ID`, `LASTNAME`, `BIRTHDATE`.
204-
In Jaybird 4, this sort is no longer applied, so columns will be in the order specified by the array: `BIRTHDATE`, `ID`, `LASTNAME`.
204+
Since Jaybird 4, this sort is no longer applied, so columns will be in the order specified by the array: `BIRTHDATE`, `ID`, `LASTNAME`.
205205
To avoid issues, we recommend specifying the columns in ascending order, or always retrieve them by name.
206206
====
207207

@@ -223,7 +223,7 @@ This method is the fastest as it does not retrieve metadata from the server.
223223
[WARNING]
224224
====
225225
In Jaybird 3 and earlier, a null or empty array was silently ignored and the statement was executed normally (not producing generated keys).
226-
In Jaybird 4, this behaviour has changed and instead will throw an exception with message _"Generated keys array columnNames was empty or null. A non-empty array is required."_
226+
Since Jaybird 4, this behaviour has changed and instead will throw an exception with message "`__Generated keys array columnNames was empty or null. A non-empty array is required.__`"
227227
====
228228

229229
[[ref-generatedkeys-examples-column-name]]
@@ -312,4 +312,4 @@ But only on Firebird 3.0 and higher, for Firebird 2.5 this will behave as `ignor
312312
* `jdbc:firebird://localhost/testdb?generatedKeysEnabled=insert,update` will only enable insert and update support
313313

314314
This feature can be used to circumvent issues with frameworks or tools that always use generated keys methods for prepare or execution.
315-
For example with `UPDATE` statements that touch multiple records and -- given the Firebird 4.0 and earlier limitations for `RETURNING` -- produce the error _"multiple rows in singleton select"_.
315+
For example with `UPDATE` statements that touch multiple records and -- given the Firebird 4.0 and earlier limitations for `RETURNING` -- produce the error "`__multiple rows in singleton select__`".

Diff for: src/docs/asciidoc/reference/types/datetime.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ In addition to the standard-defined types, it also supports the type names `TIME
223223
* Firebird 4.0 redefines `CURRENT_TIME` and `CURRENT_TIMESTAMP` to return a `WITH TIME ZONE` type.
224224
Use `LOCALTIME` and `LOCALTIMESTAMP` (introduced in Firebird 2.5.9 and Firebird 3.0.4) if you want to ensure a `WITHOUT TIME ZONE` type is used.
225225
* The database metadata will always return JDBC 4.2 compatible information on time zone types, even on Java 7, and even when legacy time zone bind is set.
226-
For Java 7 compatibility the JDBC 4.2 `java.sql.Types` constants `TIME_WITH_TIMEZONE` and `TIMESTAMP_WITH_TIMEZONE` are also defined in `org.firebirdsql.jdbc.JaybirdTypeCodes`.
226+
For Java 7 compatibility, the JDBC 4.2 `java.sql.Types` constants `TIME_WITH_TIMEZONE` and `TIMESTAMP_WITH_TIMEZONE` are also defined in `org.firebirdsql.jdbc.JaybirdTypeCodes`.
227227
* The default `sessionTimeZone` is set to the JVM default time zone, this may result in different application behavior for `DATE`, `TIME` and `TIMESTAMP`, including values generated in triggers and default value clauses.
228228
To prevent this, either switch those types to a `WITH TIME ZONE` type, or set the `sessionTimeZone` to `server` or to the actual time zone of the Firebird server.
229229
* As `CURRENT_TIME` uses the session time zone, which usually is a named zone, use in combination with `java.time.OffsetTime` can yield confusing results.

Diff for: src/docs/asciidoc/reference/types/decfloat.adoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The available options are the same as documented in <<ref-decfloat-bind>>
2929

3030
For example
3131

32-
[[source,java]]
32+
[source,java]
3333
----
3434
try (Connection connection = DriverManager.getConnection(..);
3535
Statement stmt = connection.createStatement()) {
@@ -45,7 +45,7 @@ WARNING: The effect of the `SET BIND` statement will be reset to the default whe
4545

4646
Jaybird 3.0.9 added the connection property `dataTypeBind` to defining data type mappings.
4747
This can be used to configure conversion of `DECFLOAT` to a different datatype.
48-
When set Firebird will present columns or parameters of `DECFLOAT` as the specified type, allowing clients without support for `DECFLOAT` to read or set values.
48+
When set, Firebird will present columns or parameters of `DECFLOAT` as the specified type, allowing clients without support for `DECFLOAT` to read or set values.
4949

5050
TIP: This property is also available in Jaybird 4, but we recommend to not use this property in Jaybird 4 and instead rely on the default behaviour (`native`) and support for `DECFLOAT`.
5151

@@ -54,17 +54,18 @@ To map `DECFLOAT(16)` and `DECFLOAT(34)` to a string type, you can use:
5454
[source,java]
5555
.Map all decfloat types to string
5656
----
57-
Properties props = new Properties();
58-
props.setProperty("dataTypeBind", "decfloat to varchar"
57+
var props = new Properties();
58+
props.setProperty("dataTypeBind", "decfloat to varchar");
5959
----
6060

6161
To map `DECFLOAT(16)` to `DOUBLE PRECISION` and `DECFLOAT(34)` to string, you can use:
6262

6363
[source,java]
6464
.Map all decfloat types to string
6565
----
66-
Properties props = new Properties();
67-
props.setProperty("dataTypeBind", "decfloat(16) to double precision;decfloat(34) to varchar"
66+
var props = new Properties();
67+
props.setProperty(
68+
"dataTypeBind", "decfloat(16) to double precision;decfloat(34) to varchar");
6869
----
6970

7071
Firebird will convert a `DECFLOAT` type to the specified type using a cast to derive the value.
@@ -102,8 +103,7 @@ If you need to use the type code, we suggest you use these constants.
102103
If a `DECFLOAT` type constant gets added to the JDBC standard, we will update the value.
103104
The enum value will be deprecated when that version of JDBC has been released.
104105

105-
Jaybird uses a local copy of the https://github.com/FirebirdSQL/decimal-java[FirebirdSQL/decimal-java^] library, with a custom package `org.firebirdsql.extern.decimal`.
106-
This to avoid additional dependencies.
106+
To avoid additional dependencies, Jaybird uses a local copy of the https://github.com/FirebirdSQL/decimal-java[FirebirdSQL/decimal-java^] library, with a custom package `org.firebirdsql.extern.decimal`.
107107

108108
[[ref-decfloat-precision-range]]
109109
===== Precision and range

Diff for: src/docs/asciidoc/reference/types/decimal.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
The JDBC types `DECIMAL` and `NUMERIC` are supported by Firebird and Jaybird and map to `java.math.BigDecimal`.
55

66
NOTE: Behaviour in Firebird of `NUMERIC` is closer to the SQL standard `DECIMAL` behaviour.
7-
The precision specified is the minimum precison, not the exact precision.
7+
The precision specified is the minimum precision, not the exact precision.
88

99
[[ref-decimal-precision-range]]
1010
==== Precision and range
1111

1212
In Firebird 3.0 and earlier, the maximum precision of `DECIMAL` and `NUMERIC` is 18 with a maximum scale of 18.footnote:[In practice, values with precision 19 are possible up to the maximum value of the `BIGINT` backing the value.]
1313

1414
[.since]_Firebird 4.0_ In Firebird 4.0 the maximum precision and scale of `DECIMAL` and `NUMERIC` have been raised to 38.
15-
Any `NUMERIC` or `DECIMAL` with a precision between 19 and 38 will allow storage up to a precision of 38.
15+
Any `NUMERIC` or `DECIMAL` with a precision between 19 and 38 will allow storage up to a precision of 38.footnote:[In practice, values with precision 39 are possible up to the maximum value of the `INT128` backing the value.]
1616

1717
In the implementation in Firebird, this extended precision is backed by an Int128.
1818

0 commit comments

Comments
 (0)