Compile Cypher to SQLite's SQL, reads and writes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 1
- フォーク
- 0
- 平均マージ
- 1時間 16分
- マージ済み PR(30日)
- 74
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
liberation-data/drivine-python のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
liberation-data/drivine-python#154 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
liberation-data/drivine-python#152 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
liberation-data/drivine-python#150 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
liberation-data/drivine-python#138 ·
メンテナーはふだん 1 日以内に返信
-
Cypher on SQL stores: all(), any(), none() and single() are two-valued where the predicate is nullオープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
liberation-data/drivine-python#159 ·
メンテナーはふだん 1 日以内に返信
liberation-data/drivine-python の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
521xueweihan/HelloGitHub#4115 ·
-
get_lldp_neighbors_detail: query asks for 'max-address' (typo for 'mac-address'), so remote_chassis_id is always empty対応中かも @Jah-yee が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
lesson-submission pending-review
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
Ikalus1988/MisakaNet#3899 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws-samples/sample-per-model-bedrock#549 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100