Skip to content

Commit 80a7634

Browse files
committed
Misc. copy-editing
1 parent c591280 commit 80a7634

14 files changed

Lines changed: 96 additions & 82 deletions

File tree

src/docs/asciidoc/appendices/characterencoding/characterencoding.adoc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,18 @@ The reason for this is that Java internally stores all strings in Unicode format
9090
When the `NONE` character set is used, Jaybird does not know how to interpret the received data.
9191
The only choice that is left to Jaybird is to construct a string using the default character set of the JVM, which usually matches the regional settings of the operating system and can be accessed from within the JVM through the `file.encoding` system property.
9292

93-
With connection character set `NONE`, Jaybird uses the explicit character set of `CHAR`, `VARCHAR` and `BLOB SUB_TYPE TEXT` columns for the conversion.
93+
With connection character set `NONE`, Jaybirdfootnote:[Since Jaybird 3] uses the explicit character set of `CHAR`, `VARCHAR` and `BLOB SUB_TYPE TEXT` columns for the conversion.
9494
This addresses most of the problems described in this section, except for columns without an explicit character set (i.e. their character set is `NONE`).
9595

96-
It is clear that a conversion using default character set that happens inside the JVM can lead to errors when the same content is accessed from two or more different Java Virtual Machines that have different configuration.
97-
One application running on the computer with, for example, Russian regional settings saves the Russian text (the default character set of the JVM is Cp1251) and another application running on computer with German regional settings (default character set is Cp1252) will read in such case some special or accented characters.
98-
However, when all client applications run on the same OS with the same regional settings, in most cases this will not have any severe consequences, except probably wrong sorting order or uppercasing on the server side.
96+
A conversion using the default character set of the JVM can lead to errors when the same content is accessed from two or more Java Virtual Machines that have different configuration.
97+
One application running on a computer with, for example, Russian regional settings saves Russian text (default character set of the JVM is Cp1251), and another application running on a computer with German regional settings (default character set is Cp1252) will read in such case some special or accented characters.
98+
However, when all client applications run on the same OS with the same regional settings, in most cases this will not have any severe consequences, except maybe wrong sorting order or uppercasing on the server side.
9999

100100
On Linux and other Unix platforms, it might have more severe consequences as it is very common that regional settings are not configured and that the default "C" locale is used and the non-ASCII characters will be replaced with question marks ("?").
101101

102+
Since Java 18 (https://openjdk.org/jeps/400[JEP 400^]), this is less of a concern as the default is now always UTF-8.
103+
On the other hand, this can cause unexpected behaviour when upgrading from older Java versions.
104+
102105
Therefore, an application should only use `NONE` character encoding as an encoding for a database and a connection when at least one of the following is met:
103106

104107
* The database will contain only ASCII characters,
@@ -116,7 +119,7 @@ When `encoding` property is not set or set to `NONE` and `charSet` property is n
116119
With Jaybird 3 and higher, this option has limitations when `encoding=NONE`: the conversion using `charSet` will only be applied for columns that don't have an explicit character set, otherwise that explicit character set is used for the conversion.
117120

118121
The last case is most powerful, but also is the most dangerous in use.
119-
When used properly, it can solve the problems with the legacy databases;
122+
When used properly, it can solve problems with legacy databases;
120123
when used incorrectly, one can easily trash the content of the database.
121124

122125
=== Available Encodings

src/docs/asciidoc/appendices/connectionproperties/connectionproperties.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Jaybird has a number of connection properties that can be used to configure a co
66

77
This appendix provides a list of most connection properties and a short explanation to each of them.
88
The properties listed below are usable as JDBC connection properties.
9+
Some properties have one or more aliases.
10+
The first name is the primary and preferred property name;
11+
it's usually also the name of the property in the data source classes.
912

1013
The properties marked as _boolean property_ can be included in the JDBC URL with values `true`, `false` (since:[Jaybird 5]), but also without a value, or with an empty value (which will both signify `true`).
1114
For readability, we suggest that you only specify these properties explicitly when you want to enable or disable them, and if you do, to use explicit values like `true` or `false`.
@@ -256,7 +259,7 @@ a|`useStandarUdf` +
256259
`use_standard_udf`
257260
|Jaybird specific property (until:[Jaybird 5]).
258261
Boolean property.
259-
Tells the JDBC driver to assume that standard UDF library is registered in the database when converting escaped function calls.
262+
Tells the JDBC driver to assume that the standard UDF library is registered in the database when converting escaped function calls.
260263
With recent versions of Firebird, it is advisable to not specify this property and rely on the built-in functions instead.
261264
See <<jdbcescape>> for more information.
262265

@@ -268,7 +271,7 @@ Changes how `getTime`/`getTimestamp` methods accepting a `java.util.Calendar` ap
268271
a|`num_buffers` +
269272
`isc_dpb_num_buffers`
270273
|Number of database pages that will be cached.
271-
Overrides server or database default for this specific connection.
274+
Overrides server or database default for this specific connection if the server mode is Classic or SuperClassic.
272275
Use with care to avoid using an excessive amount of memory.
273276

274277
a|`set_db_readonly` +
@@ -279,6 +282,7 @@ Set the database into read-only state.
279282
a|`set_db_sql_dialect` +
280283
`isc_dpb_set_db_sql_dialect`
281284
|Set the SQL dialect of the database.
285+
Use with care to avoid database issues.
282286

283287
a|`set_db_charset` +
284288
`isc_dpb_set_db_charset`

src/docs/asciidoc/appendices/datatypeconversion/datatypeconversion.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ a|`VARCHAR CHARACTER SET OCTETS` +
9797
|`BOOLEAN` (since:[Firebird 3.0])
9898
|`Boolean`
9999

100-
|``JaybirdTypeCodes.DECFLOAT``footnote:[JDBC does not yet define a `java.sql.Types` code for `DECFLOAT`]
100+
a|`DECFLOAT` (since:[JDBC 4.5/Java 26]) +
101+
``JaybirdTypeCodes.DECFLOAT``footnote:[JDBC 4.4 and earlier do not yet define a `java.sql.Types` code for `DECFLOAT`]
101102
|`DECFLOAT` (since:[Firebird 4.0])
102103
|`java.math.BigDecimal`
103104
|===

src/docs/asciidoc/appendices/jdbcescape/jdbcescape.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[appendix]
33
== Supported JDBC Scalar Functions
44

5-
The JDBC API has an escaped syntax for numeric, string, time, date, system and conversion functions.
5+
The JDBC API has an escape syntax for numeric, string, time, date, system and conversion functions.
66
Jaybird will try to provide an equivalent of the JDBC function using the built-in capabilities of the Firebird database.
77
When no equivalent is available, Jaybird will pass the function call "as is" to the database assuming that it contains the necessary UDF, UDR or stored function declaration.
88

src/docs/asciidoc/appendices/systemproperties/systemproperties.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ This information can be specified in connection properties, or globally using th
3636
Process name to send to Firebird
3737
`org.firebirdsql.jdbc.pid`::
3838
PID to send to Firebird (must be a valid integer)
39+
+
40+
Ignored for native and embedded connections
3941

4042
The property values are read for each connect, so the value can be changed at any time.
4143

src/docs/asciidoc/chapters/connection/connection.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ On Unix platforms the path must include the root, as the path is otherwise inter
116116
Having to include the root has the effect that a database in `/var/firebird/employee.fdb` needs to use a double `//` after the host name (and port) in the connection string: `jdbc:firebird://localhost//var/firebird/employee.fdb`.
117117

118118
It is possible to specify a relative path, but as this depends on the server configuration, this may be confusing or easily lead to errors.
119-
We suggest not to use relative paths, and instead use an alias.
119+
We recommend to not use a relative path, and instead use an alias.
120120

121121
[[connection-drivermanager-props]]
122122
==== Specifying extended properties
@@ -149,7 +149,7 @@ public class HelloServerWithEncoding {
149149
----
150150

151151
The `user` and `password` properties are defined in JDBC.
152-
All other property names -- like `encoding` here -- are driver-specific.
152+
Nearly all other property names -- like `encoding` here -- are driver-specific.
153153

154154
Additional properties, for example the SQL role for the connection can be added to the `props` object.
155155
The list of properties available in Jaybird can be found in <<connectionproperties>>.
@@ -194,7 +194,7 @@ This can be used to include otherwise unsupported characters in a connection pro
194194
* `{plus}` escaped as `%2B`
195195
+
196196
A {plus} in the query part means _space_ (0x20), so occurrences of `{plus}` (_plus_) need to be escaped;
197-
make sure to do this for _base64_ encoded values of `dbCryptConfig`, or better yet use the _base64url_ encoding instead.
197+
make sure to do this for _base64_ encoded values of <<ref-dbcrypt,`dbCryptConfig`>>, or better yet use _base64url_ encoding instead.
198198
* `%` escaped as `%25`.
199199
+
200200
A `%` in the query part introduces an escape, so occurrences of `%` (_percent_) need to be escaped.
@@ -322,10 +322,10 @@ In fact, use of JNDI is extremely uncommon these days.
322322
=== Driver types
323323

324324
As mentioned in the section <<Jaybird Architecture>>, Jaybird supports multiple implementations of the GDS API.
325-
The default Jaybird distribution contains two main categories of the implementations: the pure Java implementation of the Firebird wire protocol, and a JNA proxy that can use a Firebird `fbclient` library.
325+
The default Jaybird distribution contains two main categories of the implementations: the pure Java implementation of the Firebird wire protocol, and a https://github.com/java-native-access/jna[JNA (Java Native Access)^] proxy that can use a Firebird `fbclient` library.
326326

327327
The next sections provide a description of these types and their configuration with the corresponding JDBC URLs that should be used to obtain the connection of desired type.
328-
The type of the JDBC driver for the `javax.sql.DataSource` is configured via a corresponding property.
328+
The type of the JDBC driver for the `javax.sql.DataSource` is configured via the property `type` (`setType(String)`).
329329

330330
[[driver-pure-java]]
331331
==== PURE_JAVA type
@@ -472,7 +472,7 @@ jdbc:firebird:native:employee
472472
===== Maven dependency for native client
473473

474474
When using Jaybird 3 and later, you can use a library to provide the Firebird client library for the `native` and `local` protocol.
475-
For Windows, Linux, and macOS, you can add the `org.firebirdsql.jdbc:fbclient` dependency on your classpath.
475+
For Windows, Linux, and macOS, you can add the https://github.com/mrotteveel/jaybird-fbclient[`org.firebirdsql.jdbc:fbclient`^] dependency on your classpath.
476476
This dependency does not support the `embedded` protocol.
477477

478478
.Native libraries for all supported OS and architectures
@@ -551,7 +551,7 @@ For example, when using the Type 2 JDBC driver with a web or application server,
551551
since:[Jaybird 6] Embedded connections require the `jaybird-native` artifact on the classpath.
552552

553553
The Embedded server JDBC driver is a Type 2 JDBC driver that, rather than using the Firebird client library, loads the Firebird embedded server library instead.
554-
This is the highest performance type of JDBC driver for accessing local databases, as the Java code accesses the database file directly.
554+
This is the highest performance type of JDBC driver for accessing local databases, as the Java application accesses the database file directly.
555555

556556
The following JDBC URL syntax is supported:
557557

src/docs/asciidoc/chapters/events/events.adoc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
Firebird supports events.
55
Events are a feature that provides asynchronous notification to the connected applications about events triggered by the database or other applications.
6-
Instead of requiring applications to reread the database tables to check for the changes, events make it possible to avoid that: triggers in the database can post an event in case of a change.
6+
Instead of requiring applications to reread the database tables to check for changes, events make it possible to avoid that: triggers in the database can post an event in case of a change.
77
And even more, the event can be so specific that an application would need to reread only a limited set of records, possibly only one.
88

99
This chapter describes the event mechanism in Firebird and the common usage scenarios.
1010

1111
=== Database events
1212

13-
An _event_ is a message generated in a trigger, stored procedure or execute block that is delivered to subscribed applications.
13+
An _event_ is a message generated in PSQL code that is delivered to subscribed applications.
1414
The event is characterized only by a name which is used when the event is posted, therefore two different events must have two different names.
1515
The applications that subscribe for events are required to specify the event names of interest, no wildcards are allowed;
1616
and applications either provide a callback function that will be invoked in case of event or are required to poll for the posted events periodically.
@@ -21,7 +21,7 @@ The database engine will continue operating even if no application subscribes to
2121

2222
It can also happen that multiple transactions will be committed before the events are delivered to the client system.
2323
But even in such case the callback function will be invoked only once, and only the event name and the count of the events will be passed as parameters.
24-
The same applies to periodical polling, the application will receive event names and counts of the events since last polling.
24+
The same applies to periodical polling, the application will receive event names and counts of the events since last poll.
2525

2626
Internally, Firebird can be thought to store the subscription information in a table where columns contain event names, rows correspond to the subscribed applications and the cells contain the count of the particular event for a particular application.
2727
When an event is posted in trigger or stored procedure, Firebird checks the subscription information and increases the event count for the subscribed applications.
@@ -36,8 +36,8 @@ For such cases, applications should maintain a change tracking table where the I
3636

3737
=== Posting events
3838

39-
Events are posted from PSQL code (trigger, stored procedure, execute block, function) using the `POST_EVENT` command.
40-
It is possible to create a stored procedure with the sole purpose of posting events:
39+
Events are posted from PSQL code (trigger, stored procedure, execute block, function) using the https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref50/fblangref50-psql-coding.html#fblangref50-psql-postevent[`POST_EVENT`^] statement.
40+
It is possible to create a stored procedure with the sole purpose of posting events (e.g. to notify events from an application):
4141

4242
[source,sql]
4343
.Example of posting events from PSQL code
@@ -48,16 +48,14 @@ AS BEGIN
4848
END
4949
----
5050

51-
The `EXECUTE BLOCK` statement can be used to execute PSQL statements within DSQL code:
51+
The https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref50/fblangref50-dml-execblock.html#fblangref50-dml-execblock[`EXECUTE BLOCK`^] statement can be used to execute PSQL statements within DSQL code:
5252

5353
[source,sql]
5454
.Using EXECUTE BLOCK to post events
5555
----
5656
try (Statement stmt = connection.createStatement()) {
5757
stmt.execute(
5858
"EXECUTE BLOCK AS BEGIN POST_EVENT 'some_evt'; END");
59-
} finally {
60-
stmt.close();
6159
}
6260
----
6361

@@ -88,7 +86,7 @@ a|`port` +
8886
|Path to the database.
8987
The path is specified for the remote host but must be absolute. __Required__.
9088

91-
3+a|NOTE: since:[Jaybird 5] `serverName`, `portNumber` and `databaseName` are replacements for `host`, `port` and `databaseName`, which have been deprecated for removal in Jaybird 6.
89+
3+a|NOTE: since:[Jaybird 5] `serverName`, `portNumber` and `databaseName` are replacements for `host`, `port` and `database`, which have been deprecated for removal in Jaybird 6.
9290

9391
|user
9492
|String

src/docs/asciidoc/chapters/introduction/introduction.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,18 @@ For the JDBC specification, see https://jcp.org/en/jsr/detail?id=221[JSR 221: JD
159159

160160
General information about the Firebird database is available from the Firebird website (https://firebirdsql.org/[^]).
161161

162-
For information about using SQL in Firebird, see the https://firebirdsql.org/file/documentation/html/en/refdocs/fblangref50/firebird-50-language-reference.html[Firebird 5.0 Language Reference^] and other documents available from the https://firebirdsql.org/en/reference-manuals/[Reference Manuals^] section of the Firebird website.
162+
For information about using SQL in Firebird, see the https://firebirdsql.org/file/documentation/html/en/refdocs/fblangref50/firebird-50-language-reference.html[Firebird 5.0 Language Reference^] and other documentation available from the https://firebirdsql.org/en/reference-manuals/[Reference Manuals^] section of the Firebird website.
163163

164164
==== Jaybird Support
165165

166166
Support for Jaybird is available through the following channels:
167167

168168
* The https://groups.google.com/g/firebird-java[firebird-java Google Group^] and corresponding mailing list firebird-java@googlegroups.com
169169
+
170-
You can subscribe to the mailing list by sending an email to firebird-java+subscribe@googlegroups.com (this does not require a Google account).
170+
You can subscribe to the mailing list by sending an email to firebird-java+subscribe@googlegroups.com (this does not require a Google account *if* you confirm by email reply).
171171
Alternatively, you can join the group at the https://groups.google.com/g/firebird-java[firebird-java Google Group^] (this requires a Google account).
172-
* On https://firebirdsql.org/docs/drivers/java/faq.html[Jaybird Frequently Asked Questions^].
173-
* On https://github.com/FirebirdSQL/jaybird/wiki/[Jaybird wiki^].
172+
* On https://firebirdsql.org/docs/drivers/java/faq.html[Jaybird Frequently Asked Questions^]
173+
* On https://github.com/FirebirdSQL/jaybird/wiki/[Jaybird wiki^]
174174

175175
=== Contributing
176176

0 commit comments

Comments
 (0)