Skip to content

Commit 8fc5de2

Browse files
Adding zerotext #70
1 parent 4cf3105 commit 8fc5de2

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sqlitecloud/drivers",
3-
"version": "1.0.116",
3+
"version": "1.0.120",
44
"description": "SQLiteCloud drivers for Typescript/Javascript in edge, web and node clients",
55
"main": "./lib/index.js",
66
"types": "./lib/index.d.ts",

src/drivers/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ export interface SQLiteCloudConfig {
3737
timeout?: number
3838
/** Name of database to open */
3939
database?: string
40-
40+
/** Flag to tell the server to zero-terminate strings */
41+
zerotext?: boolean
4142
/** Create the database if it doesn't exist? */
4243
create?: boolean
4344
/** Database will be created in memory */
4445
memory?: boolean
46+
4547
/* Enable compression */
4648
compression?: boolean
4749
/** Request for immediate responses from the server node without waiting for linerizability guarantees */

src/drivers/utilities.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ export function getInitializationCommands(config: SQLiteCloudConfig): string {
5454
if (config.compression) {
5555
commands += 'SET CLIENT KEY COMPRESSION TO 1; '
5656
}
57+
if (config.zerotext) {
58+
commands += 'SET CLIENT KEY ZEROTEXT TO 1; '
59+
}
5760
if (config.non_linearizable) {
5861
commands += 'SET CLIENT KEY NONLINEARIZABLE TO 1; '
5962
}

0 commit comments

Comments
 (0)