You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: protocol_doc/README.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -340,7 +340,7 @@ Use the header names to identify them, don't depend on the order.
340
340
| 2 | name | The name of the column. |
341
341
| 3 | type | The SQL type of the column. |
342
342
| 4 | length | This length value can help displaying the table in a console window. (Fixed-length character display) |
343
-
| 5 | typesizes | Optional. Only returned when using the ODBC driver and sent the command `Xsizeheader 1`. Contains the scale and precision (two space separated values) for the types of the columns. |
343
+
| 5 | typesizes | Optional. Only returned if enabled by the command `Xsizeheader 1`. Contains the scale and precision (two space separated values) for the types of the columns. Currently used only by the ODBC driver. |
344
344
345
345
Since the string values in the tuples contain escaped values (like `"\t"`), you can freely split or scan through the rows
346
346
by looking for tabulator characters or for their combinations with the commas.
@@ -554,7 +554,13 @@ all special characters, i.e. to use a single function for both purposes:
554
554
| Tabulator | U+0009 | `\t` |
555
555
| Carriage return | U+000D | `\r` |
556
556
| Line feed | U+000A | `\n` |
557
+
| Form feed | | `\f` |
557
558
| Null character | U+0000 | `\000` |
559
+
| All non-printable characters from the ASCII range | - | `\...` |
560
+
561
+
The `\...` stands for a back-slash, followed by 3 octal (0-7) digits.
562
+
The unicode code of the character in octal.
563
+
For example: `\011`, `\035`, `\240`.
558
564
559
565
Notice that `\000` is used, instead of `\0`. A single octal value can fail if
560
566
it is followed by numbers in the text, for example: "1234`\0`567". Which can
@@ -611,6 +617,10 @@ has no header lines, but data only.
611
617
You can know the number of total rows in the response from the third field (index 2) of
612
618
the first line of the [data response](#521-data-response---1).
613
619
620
+
Data sets are stored on the server side until the client closes the session, or until an error message is returned from the server. There's a command for closing a result set before any of those events by passing only its ID:
621
+
622
+
Xclose 2
623
+
614
624
## 6.4. Multiple queries in a single message
615
625
616
626
You can send multiple SQL queries in a single message, separated by
@@ -703,3 +713,7 @@ All string values need to be escaped as discussed in chapter [Escaping](#61-esca
703
713
Datevalues are also passed as strings.
704
714
705
715
It is important that when an [error message](#54-error---) is returned, all session data are discarded. Which includes the prepared statements.
716
+
717
+
When you don't need a prepared statement anymore, you can release it with the following command, passing its ID:
0 commit comments