@rip-lang/db 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db.rip +1 -6
- package/lib/duckdb-binary.rip +7 -2
- package/package.json +1 -1
package/db.rip
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
#
|
|
21
21
|
# ==============================================================================
|
|
22
22
|
|
|
23
|
-
import { get, post,
|
|
23
|
+
import { get, post, read, start, use } from '@rip-lang/api'
|
|
24
24
|
import { cors } from '@rip-lang/api/middleware'
|
|
25
25
|
import { open } from './lib/duckdb.mjs'
|
|
26
26
|
import { version as VERSION } from './package.json'
|
|
@@ -36,11 +36,6 @@ import {
|
|
|
36
36
|
# Enable CORS for duck-ui and other clients
|
|
37
37
|
use cors preflight: true
|
|
38
38
|
|
|
39
|
-
# Fix duck-ui's wrong content-type (sends raw SQL as form-urlencoded)
|
|
40
|
-
raw (req) ->
|
|
41
|
-
if req.headers.get('format') is 'JSONCompact'
|
|
42
|
-
req.headers.set 'content-type', 'text/plain'
|
|
43
|
-
|
|
44
39
|
# ==============================================================================
|
|
45
40
|
# Configuration
|
|
46
41
|
# ==============================================================================
|
package/lib/duckdb-binary.rip
CHANGED
|
@@ -459,8 +459,13 @@ export tokenizeSQL = (sql) ->
|
|
|
459
459
|
i++
|
|
460
460
|
while i < sql.length
|
|
461
461
|
if sql[i] is "'"
|
|
462
|
-
if sql[i + 1] is "'"
|
|
463
|
-
|
|
462
|
+
if sql[i + 1] is "'"
|
|
463
|
+
i += 2
|
|
464
|
+
else
|
|
465
|
+
i++
|
|
466
|
+
break
|
|
467
|
+
else
|
|
468
|
+
i++
|
|
464
469
|
tokens.push { offset: start, type: TokenType.STRING_CONSTANT }
|
|
465
470
|
continue
|
|
466
471
|
|