-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlitez.ijs
More file actions
66 lines (63 loc) · 1004 Bytes
/
sqlitez.ijs
File metadata and controls
66 lines (63 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
load 'data/sqlite'
cocurrent 'z'
dbopen=: 3 : 'empty locDB_z_=: sqlopen_psqlite_ y'
dbcreate=: 3 : 'empty locDB_z_=: sqlcreate_psqlite_ y'
dbreset=: 3 : 'empty locDB_z_=: 0$sqlreset_psqlite_ y'
dbclose=: 3 : 0
try. destroy__locDB 0 catch. end.
empty locDB_z_=: ''
)
dbnextseq=: 3 : 0
1 + {.dbexec'seq from sqlite_sequence where name="',y,'"'
)
dbstate=: 3 : 0
(,': ',":@dbsize) &> (y-:1) pick (dbtables'');<dbviews''
)
sql3fns=. 3 : 0
'db',y,'_z_=:3 : ''sql',y,'__locDB y''',LF
)
0!:100 ; sql3fns each cutopen 0 : 0
cmd
cols
debug
dict
error
exec
execx
exist
fkey
importcsv
index
insert
keysum
lastrowid
meta
name
read
readm
readx
reads
readsx
schema
size
tables
update
upsert
views
)
sql3fns=. 3 : 0
'db',y,'_z_=:3 : (''sql',y,'__locDB y'';'':'';''x sql',y,'__locDB y'')',LF
)
0!:100 ; sql3fns each cutopen 0 : 0
ends
endsx
head
headx
rand
randx
tail
tailx
)
sql3nouns=. 'SQLITE_'&, each ;:'INTEGER FLOAT TEXT BLOB'
". &> sql3nouns ,each '_z_=: '&, each sql3nouns ,each <'_psqlite_'
cocurrent 'base'