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
Hello,
How do I create a schema using ppx_rapper with the semicolon restriction, here's my schema creation code, which happen to not work.
I'm using the sqlite3 backend on ubuntu 20.04 and OCaml 4.13.1:
Thanks!
let init_db =
[%rapper execute {sql|
DROP TABLE IF EXISTS client
CREATE TABLE IF NOT EXISTS client(
host TEXT NON NULL,
useragent TEXT
)
DROP TABLE IF EXISTS request
CREATE TABLE IF NOT EXISTS request(
since_begin REAL,
request TEXT NON NULL,
retcode INTEGER,
size INTEGER,
referrer TEXT
)
CREATE INDEX i0 ON request(request)
CREATE INDEX i1 ON request(referrer)
DROP TABLE IF EXISTS visit
CREATE TABLE IF NOT EXISTS visit(
begin REAL,
id_client INTEGER,
spam BOOLEAN,
resources INTEGER,
pages INTEGER
)
CREATE INDEX i2 ON visit(id_client)
DROP TABLE IF EXISTS req_visit
CREATE TABLE IF NOT EXISTS req_visit(
id_visit INTEGER,
id_request INTEGER
)
CREATE INDEX i3 ON req_visit(id_visit)
CREATE INDEX i4 ON req_visit(id_request)
|sql} syntax_off]
The text was updated successfully, but these errors were encountered:
Hello,
How do I create a schema using ppx_rapper with the semicolon restriction, here's my schema creation code, which happen to not work.
I'm using the sqlite3 backend on ubuntu 20.04 and OCaml 4.13.1:
Thanks!
The text was updated successfully, but these errors were encountered: