litewriter 0.1.0__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.
- litewriter/__init__.py +59 -0
- litewriter/build.py +706 -0
- litewriter/connect.py +41 -0
- litewriter/errors.py +37 -0
- litewriter/expr.py +234 -0
- litewriter/fn.py +100 -0
- litewriter/inbox.py +192 -0
- litewriter/py.typed +1 -0
- litewriter/q.py +827 -0
- litewriter/wake.py +131 -0
- litewriter/watch.py +154 -0
- litewriter/writer.py +988 -0
- litewriter-0.1.0.dist-info/METADATA +408 -0
- litewriter-0.1.0.dist-info/RECORD +17 -0
- litewriter-0.1.0.dist-info/WHEEL +5 -0
- litewriter-0.1.0.dist-info/licenses/LICENSE +21 -0
- litewriter-0.1.0.dist-info/top_level.txt +1 -0
litewriter/__init__.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""One SQLite writer thread. Queries are data. Reads stay on the calling thread.
|
|
2
|
+
|
|
3
|
+
CPython 3.14. ``isolated=True`` is the default. A watch wakes after a
|
|
4
|
+
commit that changes a column it reads.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from litewriter.build import (
|
|
8
|
+
Delete,
|
|
9
|
+
Except,
|
|
10
|
+
Insert,
|
|
11
|
+
Intersect,
|
|
12
|
+
Query,
|
|
13
|
+
Replace,
|
|
14
|
+
Select,
|
|
15
|
+
Union,
|
|
16
|
+
UnionAll,
|
|
17
|
+
Update,
|
|
18
|
+
)
|
|
19
|
+
from litewriter.connect import connect
|
|
20
|
+
from litewriter.errors import WriterError, WriterRolledBack, WriterRuntime
|
|
21
|
+
from litewriter.expr import Expr, col, exists, lit, not_exists, param
|
|
22
|
+
from litewriter.fn import Isolated, Tx, WriteFn, isolated
|
|
23
|
+
from litewriter.q import sql, where
|
|
24
|
+
from litewriter.watch import Watch
|
|
25
|
+
from litewriter.writer import LiteWriter, Outcome, Reader, Stats
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"Delete",
|
|
29
|
+
"Except",
|
|
30
|
+
"Expr",
|
|
31
|
+
"Insert",
|
|
32
|
+
"Intersect",
|
|
33
|
+
"Isolated",
|
|
34
|
+
"LiteWriter",
|
|
35
|
+
"Outcome",
|
|
36
|
+
"Query",
|
|
37
|
+
"Reader",
|
|
38
|
+
"Replace",
|
|
39
|
+
"Select",
|
|
40
|
+
"Stats",
|
|
41
|
+
"Tx",
|
|
42
|
+
"Union",
|
|
43
|
+
"UnionAll",
|
|
44
|
+
"Update",
|
|
45
|
+
"Watch",
|
|
46
|
+
"WriteFn",
|
|
47
|
+
"WriterError",
|
|
48
|
+
"WriterRolledBack",
|
|
49
|
+
"WriterRuntime",
|
|
50
|
+
"col",
|
|
51
|
+
"connect",
|
|
52
|
+
"exists",
|
|
53
|
+
"isolated",
|
|
54
|
+
"lit",
|
|
55
|
+
"not_exists",
|
|
56
|
+
"param",
|
|
57
|
+
"sql",
|
|
58
|
+
"where",
|
|
59
|
+
]
|