bazaar-contrib-sqlite 0.3.0rc1__py3-none-any.whl

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.
Files changed (32) hide show
  1. bazaar_contrib_sqlite/__init__.py +26 -0
  2. bazaar_contrib_sqlite/compiler.py +74 -0
  3. bazaar_contrib_sqlite/database.py +323 -0
  4. bazaar_contrib_sqlite/executor.py +673 -0
  5. bazaar_contrib_sqlite/py.typed +0 -0
  6. bazaar_contrib_sqlite/resources/add_column.sql.tpl +3 -0
  7. bazaar_contrib_sqlite/resources/busy_timeout.sql.tpl +1 -0
  8. bazaar_contrib_sqlite/resources/copy.sql.tpl +3 -0
  9. bazaar_contrib_sqlite/resources/create_index.sql.tpl +13 -0
  10. bazaar_contrib_sqlite/resources/create_table.sql.tpl +21 -0
  11. bazaar_contrib_sqlite/resources/create_trigger.sql.tpl +7 -0
  12. bazaar_contrib_sqlite/resources/delete.sql.tpl +6 -0
  13. bazaar_contrib_sqlite/resources/drop_column.sql.tpl +1 -0
  14. bazaar_contrib_sqlite/resources/drop_index.sql.tpl +1 -0
  15. bazaar_contrib_sqlite/resources/drop_table.sql.tpl +1 -0
  16. bazaar_contrib_sqlite/resources/drop_trigger.sql.tpl +1 -0
  17. bazaar_contrib_sqlite/resources/fragments.sql.tpl +111 -0
  18. bazaar_contrib_sqlite/resources/insert.sql.tpl +23 -0
  19. bazaar_contrib_sqlite/resources/rename_column.sql.tpl +1 -0
  20. bazaar_contrib_sqlite/resources/rename_table.sql.tpl +1 -0
  21. bazaar_contrib_sqlite/resources/search_delete.sql.tpl +8 -0
  22. bazaar_contrib_sqlite/resources/search_insert.sql.tpl +8 -0
  23. bazaar_contrib_sqlite/resources/search_rebuild.sql.tpl +2 -0
  24. bazaar_contrib_sqlite/resources/search_table.sql.tpl +7 -0
  25. bazaar_contrib_sqlite/resources/search_update.sql.tpl +12 -0
  26. bazaar_contrib_sqlite/resources/select.sql.tpl +44 -0
  27. bazaar_contrib_sqlite/resources/update.sql.tpl +10 -0
  28. bazaar_contrib_sqlite-0.3.0rc1.dist-info/METADATA +35 -0
  29. bazaar_contrib_sqlite-0.3.0rc1.dist-info/RECORD +32 -0
  30. bazaar_contrib_sqlite-0.3.0rc1.dist-info/WHEEL +4 -0
  31. bazaar_contrib_sqlite-0.3.0rc1.dist-info/entry_points.txt +3 -0
  32. bazaar_contrib_sqlite-0.3.0rc1.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,21 @@
1
+ {% from "fragments.sql.tpl" import column_definition, predicate with context %}
2
+ {% set table = operation.table %}
3
+ CREATE {% if operation.temporary %}TEMPORARY {% endif %}TABLE {% if operation.if_not_exists %}IF NOT EXISTS {% endif %}{{ table.name | identifier }} (
4
+ {% for column in table.columns %}
5
+ {{ column_definition(column) }}{% if not loop.last %},{% endif %}
6
+ {% endfor %}
7
+ {% if table.primary_key and not (table.columns | selectattr("generated") | list) %}
8
+ , PRIMARY KEY ({{ table.primary_key | map("identifier") | join(", ") }})
9
+ {% endif %}
10
+ {% for key in table.foreign_keys %}
11
+ , FOREIGN KEY ({{ key.columns | map("identifier") | join(", ") }})
12
+ REFERENCES {{ key.table | identifier }} ({{ key.references | map("identifier") | join(", ") }})
13
+ ON DELETE {{ key.on_delete | upper }}
14
+ {% endfor %}
15
+ {% for columns in table.unique %}
16
+ , UNIQUE ({{ columns | map("identifier") | join(", ") }})
17
+ {% endfor %}
18
+ {% for check in table.checks %}
19
+ , CHECK ({{ predicate(check) }})
20
+ {% endfor %}
21
+ )
@@ -0,0 +1,7 @@
1
+ {% from "fragments.sql.tpl" import predicate with context %}
2
+ CREATE TRIGGER {{ operation.name | identifier }} AFTER {{ operation.event | upper }} ON {{ operation.table | identifier }}
3
+ {% if operation.when is not none %}WHEN {{ predicate(operation.when) }}{% endif %}
4
+ BEGIN
5
+ {% set request = operation.action %}
6
+ {% include "update.sql.tpl" %};
7
+ END
@@ -0,0 +1,6 @@
1
+ {% from "fragments.sql.tpl" import predicate, returning with context %}
2
+ DELETE FROM {{ request.table | identifier }}
3
+ {% if request.where is not none %}
4
+ WHERE {{ predicate(request.where) }}
5
+ {% endif %}
6
+ {{ returning(request.returning) }}
@@ -0,0 +1 @@
1
+ ALTER TABLE {{ operation.table | identifier }} DROP COLUMN {{ operation.column | identifier }}
@@ -0,0 +1 @@
1
+ DROP INDEX {{ operation.name | identifier }}
@@ -0,0 +1 @@
1
+ DROP TABLE {% if operation.if_exists %}IF EXISTS {% endif %}{{ operation.table | identifier }}
@@ -0,0 +1 @@
1
+ DROP TRIGGER {% if operation.if_exists %}IF EXISTS {% endif %}{{ operation.name | identifier }}
@@ -0,0 +1,111 @@
1
+ {% macro expression(node) -%}
2
+ {% if node.kind == "column" %}
3
+ {% if node.table %}{{ node.table | identifier }}.{% endif %}{{ node.name | identifier }}
4
+ {% elif node.kind == "row_id" %}
5
+ {% if node.table %}{{ node.table | identifier }}.{% endif %}rowid
6
+ {% elif node.kind == "value" %}
7
+ {{ bind(node.value) }}
8
+ {% elif node.kind == "binary" %}
9
+ ({{ expression(node.left) }} {{ node.operator }} {{ expression(node.right) }})
10
+ {% elif node.kind == "row_number" %}
11
+ ROW_NUMBER() OVER (
12
+ {% if node.partition_by %}
13
+ PARTITION BY {% for value in node.partition_by %}{{ expression(value) }}{{ ", " if not loop.last else "" }}{% endfor %}
14
+ {% endif %}
15
+ ORDER BY
16
+ {% for sort in node.order_by %}
17
+ {{ expression(sort.expression) }} {{ "DESC" if sort.descending else "ASC" }} NULLS {{ sort.nulls | upper }}{{ ", " if not loop.last else "" }}
18
+ {% endfor %}
19
+ )
20
+ {% elif node.kind == "case" %}
21
+ CASE WHEN {{ predicate(node.when) }} THEN {{ expression(node.then) }} ELSE {{ expression(node.otherwise) }} END
22
+ {% elif node.kind == "subquery" %}
23
+ ({% with request=node.query %}{% include "select.sql.tpl" %}{% endwith %})
24
+ {% elif node.kind == "call" %}
25
+ {{ node.name | upper }}(
26
+ {% for argument in node.arguments %}
27
+ {{ expression(argument) }}{{ ", " if not loop.last else "" }}
28
+ {% else %}
29
+ {% if node.name == "count" %}*{% endif %}
30
+ {% endfor %}
31
+ )
32
+ {% endif %}
33
+ {%- endmacro %}
34
+
35
+ {% macro match_query(node, term) -%}
36
+ { {{ node.columns | join(" ") }} } : "{{ term | replace('"', '""') }}"
37
+ {%- endmacro %}
38
+
39
+ {% macro predicate(node) -%}
40
+ {% if node.kind == "compare" %}
41
+ ({{ expression(node.left) }} {{ node.operator }} {{ expression(node.right) }})
42
+ {% elif node.kind == "in" %}
43
+ {% if node.values %}
44
+ ({{ expression(node.expression) }} {% if node.exclude %}NOT {% endif %}IN (
45
+ {% for value in node.values %}
46
+ {{ bind(value) }}{{ ", " if not loop.last else "" }}
47
+ {% endfor %}
48
+ ))
49
+ {% else %}
50
+ {{ 1 if node.exclude else 0 }}
51
+ {% endif %}
52
+ {% elif node.kind == "null" %}
53
+ ({{ expression(node.expression) }} IS {% if node.exclude %}NOT {% endif %}NULL)
54
+ {% elif node.kind == "contains" %}
55
+ (instr(lower({{ expression(node.expression) }}), lower({{ bind(node.text) }})) > 0)
56
+ {% elif node.kind in ("all", "any") %}
57
+ {% if node.conditions %}
58
+ (
59
+ {% for condition in node.conditions %}
60
+ {{ predicate(condition) }}
61
+ {% if not loop.last %}{{ "AND" if node.kind == "all" else "OR" }}{% endif %}
62
+ {% endfor %}
63
+ )
64
+ {% else %}
65
+ {{ 1 if node.kind == "all" else 0 }}
66
+ {% endif %}
67
+ {% elif node.kind == "not" %}
68
+ (NOT {{ predicate(node.condition) }})
69
+ {% elif node.kind == "search" %}
70
+ (
71
+ {% for term in node.terms %}
72
+ {% if term | length >= 3 %}
73
+ {{ node.table | identifier }}.{{ (node.row_key or "rowid") | identifier }} IN (
74
+ SELECT rowid FROM {{ node.index | identifier }}
75
+ WHERE {{ node.index | identifier }} MATCH {{ bind(match_query(node, term)) }}
76
+ )
77
+ {% else %}
78
+ (
79
+ {% for column in node.columns %}
80
+ instr(
81
+ lower({{ node.table | identifier }}.{{ column | identifier }}),
82
+ lower({{ bind(term) }})
83
+ ) > 0
84
+ {% if not loop.last %}OR{% endif %}
85
+ {% endfor %}
86
+ )
87
+ {% endif %}
88
+ {% if not loop.last %}AND{% endif %}
89
+ {% endfor %}
90
+ )
91
+ {% endif %}
92
+ {%- endmacro %}
93
+
94
+ {% macro column_definition(column) -%}
95
+
96
+ {{ column.name | identifier }} {{ column.type | upper }}
97
+ {% if column.generated %}PRIMARY KEY AUTOINCREMENT{% endif %}
98
+ {% if not column.nullable %}NOT NULL{% endif %}
99
+ {% if column.default is not none %}DEFAULT {{ column.default | literal }}{% endif %}
100
+ {% if column.unique %}UNIQUE{% endif %}
101
+ {% if column.check is not none %}CHECK ({{ predicate(column.check) }}){% endif %}
102
+ {% if column.references is not none %}
103
+ REFERENCES {{ column.references.table | identifier }} ({{ column.references.column | identifier }}) ON DELETE {{ column.references.on_delete | upper }}
104
+ {% endif %}
105
+ {%- endmacro %}
106
+
107
+ {% macro returning(columns) %}
108
+ {% if columns %}
109
+ RETURNING {{ columns | map("identifier") | join(", ") }}
110
+ {% endif %}
111
+ {% endmacro %}
@@ -0,0 +1,23 @@
1
+ {% from "fragments.sql.tpl" import returning %}
2
+ {% set columns = request.rows[0].keys() | list %}
3
+ INSERT INTO {{ request.table | identifier }} ({{ columns | map("identifier") | join(", ") }})
4
+ VALUES
5
+ {% for row in request.rows %}
6
+ (
7
+ {% for column in columns %}
8
+ {{ bind(row[column]) }}{{ ", " if not loop.last else "" }}
9
+ {% endfor %}
10
+ ){{ ", " if not loop.last else "" }}
11
+ {% endfor %}
12
+ {% if request.conflict is not none %}
13
+ ON CONFLICT ({{ request.conflict.columns | map("identifier") | join(", ") }})
14
+ {% if request.conflict.update %}
15
+ DO UPDATE SET
16
+ {% for column in request.conflict.update %}
17
+ {{ column | identifier }} = excluded.{{ column | identifier }}{% if not loop.last %},{% endif %}
18
+ {% endfor %}
19
+ {% else %}
20
+ DO NOTHING
21
+ {% endif %}
22
+ {% endif %}
23
+ {{ returning(request.returning) }}
@@ -0,0 +1 @@
1
+ ALTER TABLE {{ operation.table | identifier }} RENAME COLUMN {{ operation.column | identifier }} TO {{ operation.name | identifier }}
@@ -0,0 +1 @@
1
+ ALTER TABLE {{ operation.table | identifier }} RENAME TO {{ operation.name | identifier }}
@@ -0,0 +1,8 @@
1
+ CREATE TRIGGER {{ (operation.index.name ~ "_ad") | identifier }}
2
+ AFTER DELETE ON {{ operation.table | identifier }}
3
+ BEGIN
4
+ INSERT INTO {{ operation.index.name | identifier }}
5
+ ({{ operation.index.name | identifier }}, rowid, {{ operation.index.columns | map("identifier") | join(", ") }})
6
+ VALUES
7
+ ('delete', old.{{ (operation.index.row_key or "rowid") | identifier }}, {% for column in operation.index.columns %}old.{{ column | identifier }}{% if not loop.last %}, {% endif %}{% endfor %});
8
+ END
@@ -0,0 +1,8 @@
1
+ CREATE TRIGGER {{ (operation.index.name ~ "_ai") | identifier }}
2
+ AFTER INSERT ON {{ operation.table | identifier }}
3
+ BEGIN
4
+ INSERT INTO {{ operation.index.name | identifier }}
5
+ (rowid, {{ operation.index.columns | map("identifier") | join(", ") }})
6
+ VALUES
7
+ (new.{{ (operation.index.row_key or "rowid") | identifier }}, {% for column in operation.index.columns %}new.{{ column | identifier }}{% if not loop.last %}, {% endif %}{% endfor %});
8
+ END
@@ -0,0 +1,2 @@
1
+ INSERT INTO {{ operation.index.name | identifier }} ({{ operation.index.name | identifier }})
2
+ VALUES ('rebuild')
@@ -0,0 +1,7 @@
1
+ CREATE VIRTUAL TABLE {{ operation.index.name | identifier }}
2
+ USING fts5(
3
+ {{ operation.index.columns | map("identifier") | join(", ") }},
4
+ content={{ operation.table | literal }},
5
+ content_rowid={{ (operation.index.row_key or "rowid") | literal }},
6
+ tokenize='trigram'
7
+ )
@@ -0,0 +1,12 @@
1
+ CREATE TRIGGER {{ (operation.index.name ~ "_au") | identifier }}
2
+ AFTER UPDATE ON {{ operation.table | identifier }}
3
+ BEGIN
4
+ INSERT INTO {{ operation.index.name | identifier }}
5
+ ({{ operation.index.name | identifier }}, rowid, {{ operation.index.columns | map("identifier") | join(", ") }})
6
+ VALUES
7
+ ('delete', old.{{ (operation.index.row_key or "rowid") | identifier }}, {% for column in operation.index.columns %}old.{{ column | identifier }}{% if not loop.last %}, {% endif %}{% endfor %});
8
+ INSERT INTO {{ operation.index.name | identifier }}
9
+ (rowid, {{ operation.index.columns | map("identifier") | join(", ") }})
10
+ VALUES
11
+ (new.{{ (operation.index.row_key or "rowid") | identifier }}, {% for column in operation.index.columns %}new.{{ column | identifier }}{% if not loop.last %}, {% endif %}{% endfor %});
12
+ END
@@ -0,0 +1,44 @@
1
+ {% from "fragments.sql.tpl" import expression, predicate with context %}
2
+ {% if request.ctes %}
3
+ WITH
4
+ {% for name, query in request.ctes.items() %}
5
+ {{ name | identifier }} AS (
6
+ {% with request=query %}{% include "select.sql.tpl" %}{% endwith %}
7
+ ){% if not loop.last %},{% endif %}
8
+ {% endfor %}
9
+ {% endif %}
10
+ SELECT {% if request.distinct %}DISTINCT {% endif %}
11
+ {% for alias, value in request.columns.items() %}
12
+ {{ expression(value) }} AS {{ alias | identifier }}{% if not loop.last %},{% endif %}
13
+ {% else %}
14
+ *
15
+ {% endfor %}
16
+ FROM {{ request.table | identifier }}{% if request.alias %} AS {{ request.alias | identifier }}{% endif %}
17
+
18
+ {% for join in request.joins %}
19
+ {{ join.kind | upper }} JOIN {{ join.table | identifier }}{% if join.alias %} AS {{ join.alias | identifier }}{% endif %}
20
+
21
+ ON {{ predicate(join.on) }}
22
+ {% endfor %}
23
+ {% if request.where is not none %}
24
+ WHERE {{ predicate(request.where) }}
25
+ {% endif %}
26
+ {% if request.group_by %}
27
+ GROUP BY {% for value in request.group_by %}{{ expression(value) }}{% if not loop.last %}, {% endif %}{% endfor %}
28
+
29
+ {% endif %}
30
+ {% if request.having is not none %}
31
+ HAVING {{ predicate(request.having) }}
32
+ {% endif %}
33
+ {% if request.order_by %}
34
+ ORDER BY
35
+ {% for item in request.order_by %}
36
+ {{ expression(item.expression) }} {{ "DESC" if item.descending else "ASC" }} NULLS {{ item.nulls | upper }}{% if not loop.last %},{% endif %}
37
+ {% endfor %}
38
+ {% endif %}
39
+ {% if request.limit is not none or request.offset %}
40
+ LIMIT {{ bind(request.limit if request.limit is not none else -1) }}
41
+ {% endif %}
42
+ {% if request.offset %}
43
+ OFFSET {{ bind(request.offset) }}
44
+ {% endif %}
@@ -0,0 +1,10 @@
1
+ {% from "fragments.sql.tpl" import expression, predicate, returning with context %}
2
+ UPDATE {{ request.table | identifier }}
3
+ SET
4
+ {% for column, value in request.values.items() %}
5
+ {{ column | identifier }} = {{ expression(value) }}{% if not loop.last %},{% endif %}
6
+ {% endfor %}
7
+ {% if request.where is not none %}
8
+ WHERE {{ predicate(request.where) }}
9
+ {% endif %}
10
+ {{ returning(request.returning) }}
@@ -0,0 +1,35 @@
1
+ Metadata-Version: 2.4
2
+ Name: bazaar-contrib-sqlite
3
+ Version: 0.3.0rc1
4
+ Summary: SQLite implementation of the shared storage contract
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ Requires-Dist: bazaar-core~=0.3.0rc1
8
+ Requires-Dist: bazaar-contrib-storage~=0.3.0rc1
9
+ Requires-Dist: aiosqlite>=0.20.0
10
+ Requires-Dist: pydantic>=2.12.0
11
+ Requires-Dist: jinja2>=3.1.6
12
+ Requires-Python: >=3.15
13
+ Project-URL: Repository, https://github.com/yuchanns/bazaar-compute-node
14
+ Description-Content-Type: text/markdown
15
+
16
+ # bazaar-contrib-sqlite
17
+
18
+ Store node data in SQLite. Enable `storage` and select its `database` entry with `backend = "sqlite"`.
19
+
20
+ ```sh
21
+ bcn contrib add sqlite --enable
22
+ ```
23
+
24
+ The corresponding entry in `config.toml`:
25
+
26
+ ```toml
27
+ version = "5"
28
+
29
+ [[contribs]]
30
+ package = "bazaar-contrib-sqlite~=0.3.0rc1"
31
+ [[contribs.enabled]]
32
+ entry = "sqlite"
33
+ [contribs.enabled.config]
34
+ path = "/path/to/node.db"
35
+ ```
@@ -0,0 +1,32 @@
1
+ bazaar_contrib_sqlite/__init__.py,sha256=ohbeO0DNxDAJebkLNjPHKKMC1oAL0wcq1WBwHbQdafI,751
2
+ bazaar_contrib_sqlite/compiler.py,sha256=Wd5AvyL_uEjsdwduhi5JR9lwE57jrUA1N9Ld409v5S0,2328
3
+ bazaar_contrib_sqlite/database.py,sha256=JhGuzK080iA9jOlBaRLLmSfE4lntSldUR5T3z8DlyU0,12700
4
+ bazaar_contrib_sqlite/executor.py,sha256=k-7eHtcvyzhIjx3Lw-ty4LrJ1pbc6_jhnw0_bEGWfEs,23610
5
+ bazaar_contrib_sqlite/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ bazaar_contrib_sqlite/resources/add_column.sql.tpl,sha256=Antc3JRsHXmGspVyvjbRYgIMljc9L7ZvnU-DTYQ4d1Q,169
7
+ bazaar_contrib_sqlite/resources/busy_timeout.sql.tpl,sha256=vW9sREt6cSWWfy-otpf0-iwZBp30_LBTJkqjSboBHDg,36
8
+ bazaar_contrib_sqlite/resources/copy.sql.tpl,sha256=eAuWd3-8B4qil-8G1uqTEHwJEEGKuuv2JDm-JoXm9v4,173
9
+ bazaar_contrib_sqlite/resources/create_index.sql.tpl,sha256=EJRkD16jE4VHZuOAwAG6OKwWpH9jNsIa39O5zanEIdg,696
10
+ bazaar_contrib_sqlite/resources/create_table.sql.tpl,sha256=hqH_9XNmf3kmOzp2M8IzLs0W5Q7CTlfyn3ssVTj5BAw,1014
11
+ bazaar_contrib_sqlite/resources/create_trigger.sql.tpl,sha256=HD2uWBiw8djHwFIF1Wozd7xN9H9DQ-UYM0iNHjhDv8k,354
12
+ bazaar_contrib_sqlite/resources/delete.sql.tpl,sha256=IG-KpV8VoYqwwKO44lZ9ahBjeIlBZXZFhZyMloJoG2k,236
13
+ bazaar_contrib_sqlite/resources/drop_column.sql.tpl,sha256=WTcf80YCNhqn3qgiAEQi7nv3ZkiNEA8ynjR4Su56Cbo,95
14
+ bazaar_contrib_sqlite/resources/drop_index.sql.tpl,sha256=Qhmpo3evAN0UEkE765cQAm0VN_T6PIsshHFdEmbQscI,45
15
+ bazaar_contrib_sqlite/resources/drop_table.sql.tpl,sha256=OFma7bASRv3JOmVMnW2_UBNFB6E-UvXNeKXQpxdFgfk,95
16
+ bazaar_contrib_sqlite/resources/drop_trigger.sql.tpl,sha256=jrTBT3D2kTgjgTIcQKKXfDonIkU6adTF-AO9BlVLGAA,96
17
+ bazaar_contrib_sqlite/resources/fragments.sql.tpl,sha256=GuGgCnmG38lFZ3EiWTVDhBDWGWRJAU6ouAj9AANLX7o,4320
18
+ bazaar_contrib_sqlite/resources/insert.sql.tpl,sha256=bND7hA2qFHTEb4FmGlBaQ7n1Zg6iIKjd0F-mxZegZPs,807
19
+ bazaar_contrib_sqlite/resources/rename_column.sql.tpl,sha256=AA1ntP4rFL7rgPRYufvxnMsiusyFWXn2edaoW3TidNU,134
20
+ bazaar_contrib_sqlite/resources/rename_table.sql.tpl,sha256=54TeLbU3Kq8jYX8x4mhRBthsHi5i7QMcRjawJ2JH5sw,91
21
+ bazaar_contrib_sqlite/resources/search_delete.sql.tpl,sha256=gOj3Z_LLiE9u-ibJKvvM2PCMnXjtZUpCdUnwyreGv54,516
22
+ bazaar_contrib_sqlite/resources/search_insert.sql.tpl,sha256=5Oz3l_kUbmJMWuU5BvVG5Rx1hIOB8ng2P-Sr6zThlHg,465
23
+ bazaar_contrib_sqlite/resources/search_rebuild.sql.tpl,sha256=JDPvnYZbp4g3w3jx03514ctN2MgYm-ogUBiqB44AkC8,113
24
+ bazaar_contrib_sqlite/resources/search_table.sql.tpl,sha256=AeVXipAQEF0SCiFIPRdHQzdMwMIeHBL8j1obJkd0Tcw,283
25
+ bazaar_contrib_sqlite/resources/search_update.sql.tpl,sha256=ZaYe7FNRPsHg19ftfGg_f4X4ZzpWjjl_NvO6jQro7o8,855
26
+ bazaar_contrib_sqlite/resources/select.sql.tpl,sha256=bIUhAmGsFqL1MeBz8VNgh2hjrMdnPvDL0se3W3s5Hd8,1605
27
+ bazaar_contrib_sqlite/resources/update.sql.tpl,sha256=Q9LeDcWeBk0ZWwdvZARbDZB_806aVF3NPDctILmivz8,400
28
+ bazaar_contrib_sqlite-0.3.0rc1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
29
+ bazaar_contrib_sqlite-0.3.0rc1.dist-info/WHEEL,sha256=xTCBFIZIIyRSxyowOv5Wqg_jFU6KsdIffuulBB09Ph8,80
30
+ bazaar_contrib_sqlite-0.3.0rc1.dist-info/entry_points.txt,sha256=A3tedEy8b--Rv-5vQ5LVsDaNX7Oq0IQ5rBqveHkw4bA,70
31
+ bazaar_contrib_sqlite-0.3.0rc1.dist-info/METADATA,sha256=4aQv_aBBfZkvQKUzHOKHpvbicDpsp5_fFO8X1UBV6Jo,889
32
+ bazaar_contrib_sqlite-0.3.0rc1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.13.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [bazaar_compute_node.contribs]
2
+ sqlite = bazaar_contrib_sqlite:sqlite
3
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.