sqlite-export-for-ynab 1.3.2__tar.gz → 1.4.0__tar.gz
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.
- {sqlite_export_for_ynab-1.3.2/sqlite_export_for_ynab.egg-info → sqlite_export_for_ynab-1.4.0}/PKG-INFO +1 -1
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/setup.cfg +1 -1
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/_main.py +29 -2
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/ddl/create-relations.sql +7 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0/sqlite_export_for_ynab.egg-info}/PKG-INFO +1 -1
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/testing/fixtures.py +20 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/tests/_main_test.py +14 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/LICENSE +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/README.md +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/pyproject.toml +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/setup.py +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/__init__.py +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/__main__.py +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/ddl/__init__.py +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/ddl/drop-relations.sql +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/py.typed +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab.egg-info/SOURCES.txt +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab.egg-info/dependency_links.txt +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab.egg-info/entry_points.txt +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab.egg-info/requires.txt +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab.egg-info/top_level.txt +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/testing/__init__.py +0 -0
- {sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/tests/__init__.py +0 -0
{sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/_main.py
RENAMED
|
@@ -211,8 +211,35 @@ def insert_budgets(
|
|
|
211
211
|
cur: sqlite3.Cursor, budgets: list[dict[str, Any]], lkos: dict[str, int]
|
|
212
212
|
) -> None:
|
|
213
213
|
cur.executemany(
|
|
214
|
-
"
|
|
215
|
-
|
|
214
|
+
"""
|
|
215
|
+
INSERT OR REPLACE INTO budgets (
|
|
216
|
+
id
|
|
217
|
+
, name
|
|
218
|
+
, currency_format_currency_symbol
|
|
219
|
+
, currency_format_decimal_digits
|
|
220
|
+
, currency_format_decimal_separator
|
|
221
|
+
, currency_format_display_symbol
|
|
222
|
+
, currency_format_group_separator
|
|
223
|
+
, currency_format_iso_code
|
|
224
|
+
, currency_format_symbol_first
|
|
225
|
+
, last_knowledge_of_server
|
|
226
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
227
|
+
""",
|
|
228
|
+
(
|
|
229
|
+
(
|
|
230
|
+
bid := b["id"],
|
|
231
|
+
b["name"],
|
|
232
|
+
b["currency_format"]["currency_symbol"],
|
|
233
|
+
b["currency_format"]["decimal_digits"],
|
|
234
|
+
b["currency_format"]["decimal_separator"],
|
|
235
|
+
b["currency_format"]["display_symbol"],
|
|
236
|
+
b["currency_format"]["group_separator"],
|
|
237
|
+
b["currency_format"]["iso_code"],
|
|
238
|
+
b["currency_format"]["symbol_first"],
|
|
239
|
+
lkos[bid],
|
|
240
|
+
)
|
|
241
|
+
for b in budgets
|
|
242
|
+
),
|
|
216
243
|
)
|
|
217
244
|
|
|
218
245
|
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
CREATE TABLE IF NOT EXISTS budgets (
|
|
2
2
|
id TEXT PRIMARY KEY
|
|
3
3
|
, name TEXT
|
|
4
|
+
, currency_format_currency_symbol TEXT
|
|
5
|
+
, currency_format_decimal_digits INT
|
|
6
|
+
, currency_format_decimal_separator TEXT
|
|
7
|
+
, currency_format_display_symbol BOOLEAN
|
|
8
|
+
, currency_format_group_separator TEXT
|
|
9
|
+
, currency_format_iso_code TEXT
|
|
10
|
+
, currency_format_symbol_first BOOLEAN
|
|
4
11
|
, last_knowledge_of_server INT
|
|
5
12
|
)
|
|
6
13
|
;
|
|
@@ -18,10 +18,30 @@ BUDGETS: list[dict[str, Any]] = [
|
|
|
18
18
|
{
|
|
19
19
|
"id": BUDGET_ID_1,
|
|
20
20
|
"name": "Budget 1",
|
|
21
|
+
"currency_format": {
|
|
22
|
+
"currency_symbol": "$",
|
|
23
|
+
"decimal_digits": 2,
|
|
24
|
+
"decimal_separator": ".",
|
|
25
|
+
"display_symbol": True,
|
|
26
|
+
"example_format": "123,456.78",
|
|
27
|
+
"group_separator": ",",
|
|
28
|
+
"iso_code": "USD",
|
|
29
|
+
"symbol_first": True,
|
|
30
|
+
},
|
|
21
31
|
},
|
|
22
32
|
{
|
|
23
33
|
"id": BUDGET_ID_2,
|
|
24
34
|
"name": "Budget 2",
|
|
35
|
+
"currency_format": {
|
|
36
|
+
"currency_symbol": "$",
|
|
37
|
+
"decimal_digits": 2,
|
|
38
|
+
"decimal_separator": ".",
|
|
39
|
+
"display_symbol": True,
|
|
40
|
+
"example_format": "123,456.78",
|
|
41
|
+
"group_separator": ",",
|
|
42
|
+
"iso_code": "USD",
|
|
43
|
+
"symbol_first": True,
|
|
44
|
+
},
|
|
25
45
|
},
|
|
26
46
|
]
|
|
27
47
|
|
|
@@ -107,11 +107,25 @@ def test_insert_budgets(cur):
|
|
|
107
107
|
{
|
|
108
108
|
"id": BUDGET_ID_1,
|
|
109
109
|
"name": BUDGETS[0]["name"],
|
|
110
|
+
"currency_format_currency_symbol": "$",
|
|
111
|
+
"currency_format_decimal_digits": 2,
|
|
112
|
+
"currency_format_decimal_separator": ".",
|
|
113
|
+
"currency_format_display_symbol": 1,
|
|
114
|
+
"currency_format_group_separator": ",",
|
|
115
|
+
"currency_format_iso_code": "USD",
|
|
116
|
+
"currency_format_symbol_first": 1,
|
|
110
117
|
"last_knowledge_of_server": LKOS[BUDGET_ID_1],
|
|
111
118
|
},
|
|
112
119
|
{
|
|
113
120
|
"id": BUDGET_ID_2,
|
|
114
121
|
"name": BUDGETS[1]["name"],
|
|
122
|
+
"currency_format_currency_symbol": "$",
|
|
123
|
+
"currency_format_decimal_digits": 2,
|
|
124
|
+
"currency_format_decimal_separator": ".",
|
|
125
|
+
"currency_format_display_symbol": 1,
|
|
126
|
+
"currency_format_group_separator": ",",
|
|
127
|
+
"currency_format_iso_code": "USD",
|
|
128
|
+
"currency_format_symbol_first": 1,
|
|
115
129
|
"last_knowledge_of_server": LKOS[BUDGET_ID_2],
|
|
116
130
|
},
|
|
117
131
|
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/__init__.py
RENAMED
|
File without changes
|
{sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/__main__.py
RENAMED
|
File without changes
|
{sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/ddl/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{sqlite_export_for_ynab-1.3.2 → sqlite_export_for_ynab-1.4.0}/sqlite_export_for_ynab/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|