Compile Cypher to SQLite's SQL, reads and writes
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start with the shared SQL compiler, the SQLite store from #80, and the shared spec for queries, writes, temporal behavior, and refusals. Then review the SQLite cross-engine contracts, noting which tests need a second writer and cannot run under SQLite's write lock. Done means the Cypher compiler, registered SQLite functions, serialized write steps, and stated test contracts work together.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Port of liberation-data/drivine4j203: the Cypher compiler's SQLite target, so a Cypher statement runs on a SQLite graph and gives the rows a graph engine gives. It builds on the SQLite store (#80).
What drivine4j does
- A third dialect of the shared SQL compiler, beside Postgres and Oracle. A compiled statement opens with
/* drivine:json */, so its text values are read as JSON. - Values are JSON text. A value that passes through a subquery is text again, so it is wrapped in
json(…)wherever it goes intojson_array,json_object,json_group_arrayorjson_set. - Functions registered on each connection do what SQLite's JSON functions don't:
drivine_equal(a, b): Cypher equality.1equals1.0, maps compare in any key order, null gives null.drivine_contains(props, map): a pattern's map of properties.drivine_add(a, b):+of numbers, lists (a null is taken as an item) and texts.drivine_canonical(json): maps' keys in order, soDISTINCTand grouping treat two maps of the same entries as one.drivine_upper,drivine_split,drivine_reverse,drivine_uuid.drivine_regex_group,drivine_regexp_replace(groups written\1).drivine_trunc: whole where it fits. A real within 2 ulps of a whole number counts as that number.drivine_to_char: theto_charpatterns the temporal SQL uses.drivine_temporal(op, …):local,utc,extract,add_months,add_time,months_between,seconds_between,truncate.
- Timestamps are fixed-width ISO text,
YYYY-MM-DDTHH:MM:SS.ffffff. The statement's clock is a literal taken as it is compiled, so one statement reads one clock. - No LATERAL. An
OPTIONAL MATCH, aCALL { … }, a walk or a shortest path gathers its rows as a JSON list of maps in a subquery:json_each((SELECT json_group_array(json_object(…)) FROM (…) q)). That subquery can read the outer row. Each column is read back with->(JSON,NULLIF(…, 'null')) or->>. - Id lists are
,1,2,text, as on Oracle. - An order puts nulls
NULLS LASTascending andNULLS FIRSTdescending. It sorts byx ->> '$'. - Writes are a procedure of steps: select-into, let, loop over a query's rows, if, raise, execute (
RETURNING … INTO), return. The steps are serialised as JSON. Each variable a step's SQL reads becomes a numbered parameter (?1); literals and quoted names are skipped.drivine_cypher(steps, params)carries the steps out on the statement's connection under a SAVEPOINT. =~istext REGEXP ('^(?:' || pattern || ')\z').
Tests
- Run the shared spec on SQLite: queries, writes, temporal, refusals.
- Run the cross-engine contracts that seed in Cypher.
- Contract tests that need a second writer inside an open transaction can't run on SQLite: a transaction holds the write lock from
BEGIN IMMEDIATE.
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 0
- Merge medio
- 1h 16m
- PR unite (30g)
- 74
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di liberation-data/drivine-python
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
liberation-data/drivine-python#154 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
liberation-data/drivine-python#152 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
liberation-data/drivine-python#150 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
liberation-data/drivine-python#138 ·
I maintainer di solito rispondono entro 1 giorno
-
Cypher on SQL stores: all(), any(), none() and single() are two-valued where the predicate is nullAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
liberation-data/drivine-python#159 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di liberation-data/drivine-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sylvainmetayer/homelab#851 ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Add `ty-pre-commit` hookAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
kubeflow/docs-agent#279 ·
I maintainer di solito rispondono entro 3 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
Qiskit/qiskit-ibm-runtime#3523 ·
I maintainer di solito rispondono entro 1 giorno