piccolo 1.9.0__py3-none-any.whl → 1.11.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.
- piccolo/__init__.py +1 -1
- piccolo/apps/fixtures/commands/load.py +1 -1
- piccolo/apps/migrations/auto/__init__.py +8 -0
- piccolo/apps/migrations/auto/migration_manager.py +2 -1
- piccolo/apps/migrations/commands/backwards.py +3 -1
- piccolo/apps/migrations/commands/base.py +1 -1
- piccolo/apps/migrations/commands/check.py +1 -1
- piccolo/apps/migrations/commands/clean.py +1 -1
- piccolo/apps/migrations/commands/forwards.py +3 -1
- piccolo/apps/migrations/commands/new.py +4 -2
- piccolo/apps/schema/commands/generate.py +2 -2
- piccolo/apps/shell/commands/run.py +1 -1
- piccolo/columns/column_types.py +56 -39
- piccolo/columns/defaults/base.py +1 -1
- piccolo/columns/defaults/date.py +9 -1
- piccolo/columns/defaults/interval.py +1 -0
- piccolo/columns/defaults/time.py +9 -1
- piccolo/columns/defaults/timestamp.py +1 -0
- piccolo/columns/defaults/uuid.py +1 -1
- piccolo/columns/m2m.py +7 -7
- piccolo/columns/operators/comparison.py +4 -0
- piccolo/conf/apps.py +9 -4
- piccolo/engine/base.py +69 -20
- piccolo/engine/cockroach.py +2 -3
- piccolo/engine/postgres.py +33 -19
- piccolo/engine/sqlite.py +27 -22
- piccolo/query/functions/__init__.py +11 -1
- piccolo/query/functions/datetime.py +260 -0
- piccolo/query/functions/string.py +45 -0
- piccolo/query/methods/create_index.py +1 -1
- piccolo/query/methods/drop_index.py +1 -1
- piccolo/query/methods/objects.py +7 -7
- piccolo/query/methods/select.py +13 -7
- piccolo/query/mixins.py +3 -10
- piccolo/schema.py +18 -11
- piccolo/table.py +22 -21
- piccolo/utils/encoding.py +5 -3
- {piccolo-1.9.0.dist-info → piccolo-1.11.0.dist-info}/METADATA +1 -1
- {piccolo-1.9.0.dist-info → piccolo-1.11.0.dist-info}/RECORD +52 -50
- tests/apps/migrations/auto/integration/test_migrations.py +1 -1
- tests/columns/test_array.py +28 -0
- tests/conf/test_apps.py +1 -1
- tests/engine/test_nested_transaction.py +2 -0
- tests/engine/test_transaction.py +1 -2
- tests/query/functions/test_datetime.py +114 -0
- tests/query/functions/test_string.py +34 -2
- tests/table/test_indexes.py +4 -2
- tests/utils/test_pydantic.py +70 -29
- {piccolo-1.9.0.dist-info → piccolo-1.11.0.dist-info}/LICENSE +0 -0
- {piccolo-1.9.0.dist-info → piccolo-1.11.0.dist-info}/WHEEL +0 -0
- {piccolo-1.9.0.dist-info → piccolo-1.11.0.dist-info}/entry_points.txt +0 -0
- {piccolo-1.9.0.dist-info → piccolo-1.11.0.dist-info}/top_level.txt +0 -0
piccolo/query/methods/select.py
CHANGED
@@ -5,11 +5,11 @@ import typing as t
|
|
5
5
|
from collections import OrderedDict
|
6
6
|
|
7
7
|
from piccolo.columns import Column, Selectable
|
8
|
-
from piccolo.columns.column_types import JSON, JSONB
|
8
|
+
from piccolo.columns.column_types import JSON, JSONB
|
9
9
|
from piccolo.columns.m2m import M2MSelect
|
10
10
|
from piccolo.columns.readable import Readable
|
11
11
|
from piccolo.custom_types import TableInstance
|
12
|
-
from piccolo.engine.base import
|
12
|
+
from piccolo.engine.base import BaseBatch
|
13
13
|
from piccolo.query.base import Query
|
14
14
|
from piccolo.query.mixins import (
|
15
15
|
AsOfDelegate,
|
@@ -217,7 +217,7 @@ class Select(Query[TableInstance, t.List[t.Dict[str, t.Any]]]):
|
|
217
217
|
self,
|
218
218
|
response: t.List[t.Dict[str, t.Any]],
|
219
219
|
secondary_table: t.Type[Table],
|
220
|
-
secondary_table_pk:
|
220
|
+
secondary_table_pk: Column,
|
221
221
|
m2m_name: str,
|
222
222
|
m2m_select: M2MSelect,
|
223
223
|
as_list: bool = False,
|
@@ -386,14 +386,20 @@ class Select(Query[TableInstance, t.List[t.Dict[str, t.Any]]]):
|
|
386
386
|
return self
|
387
387
|
|
388
388
|
@t.overload
|
389
|
-
def output(self: Self, *, as_list: bool) -> SelectList:
|
389
|
+
def output(self: Self, *, as_list: bool) -> SelectList: # type: ignore
|
390
|
+
...
|
390
391
|
|
391
392
|
@t.overload
|
392
|
-
def output(self: Self, *, as_json: bool) -> SelectJSON:
|
393
|
+
def output(self: Self, *, as_json: bool) -> SelectJSON: # type: ignore
|
394
|
+
...
|
393
395
|
|
394
396
|
@t.overload
|
395
397
|
def output(self: Self, *, load_json: bool) -> Self: ...
|
396
398
|
|
399
|
+
@t.overload
|
400
|
+
def output(self: Self, *, load_json: bool, as_list: bool) -> SelectJSON: # type: ignore # noqa: E501
|
401
|
+
...
|
402
|
+
|
397
403
|
@t.overload
|
398
404
|
def output(self: Self, *, nested: bool) -> Self: ...
|
399
405
|
|
@@ -404,7 +410,7 @@ class Select(Query[TableInstance, t.List[t.Dict[str, t.Any]]]):
|
|
404
410
|
as_json: bool = False,
|
405
411
|
load_json: bool = False,
|
406
412
|
nested: bool = False,
|
407
|
-
):
|
413
|
+
) -> t.Union[Self, SelectJSON, SelectList]:
|
408
414
|
self.output_delegate.output(
|
409
415
|
as_list=as_list,
|
410
416
|
as_json=as_json,
|
@@ -436,7 +442,7 @@ class Select(Query[TableInstance, t.List[t.Dict[str, t.Any]]]):
|
|
436
442
|
batch_size: t.Optional[int] = None,
|
437
443
|
node: t.Optional[str] = None,
|
438
444
|
**kwargs,
|
439
|
-
) ->
|
445
|
+
) -> BaseBatch:
|
440
446
|
if batch_size:
|
441
447
|
kwargs.update(batch_size=batch_size)
|
442
448
|
if node:
|
piccolo/query/mixins.py
CHANGED
@@ -207,7 +207,6 @@ class Returning:
|
|
207
207
|
|
208
208
|
@dataclass
|
209
209
|
class Output:
|
210
|
-
|
211
210
|
as_json: bool = False
|
212
211
|
as_list: bool = False
|
213
212
|
as_objects: bool = False
|
@@ -236,7 +235,6 @@ class Callback:
|
|
236
235
|
|
237
236
|
@dataclass
|
238
237
|
class WhereDelegate:
|
239
|
-
|
240
238
|
_where: t.Optional[Combinable] = None
|
241
239
|
_where_columns: t.List[Column] = field(default_factory=list)
|
242
240
|
|
@@ -246,7 +244,8 @@ class WhereDelegate:
|
|
246
244
|
needed.
|
247
245
|
"""
|
248
246
|
self._where_columns = []
|
249
|
-
self.
|
247
|
+
if self._where is not None:
|
248
|
+
self._extract_columns(self._where)
|
250
249
|
return self._where_columns
|
251
250
|
|
252
251
|
def _extract_columns(self, combinable: Combinable):
|
@@ -277,7 +276,6 @@ class WhereDelegate:
|
|
277
276
|
|
278
277
|
@dataclass
|
279
278
|
class OrderByDelegate:
|
280
|
-
|
281
279
|
_order_by: OrderBy = field(default_factory=OrderBy)
|
282
280
|
|
283
281
|
def get_order_by_columns(self) -> t.List[Column]:
|
@@ -303,7 +301,6 @@ class OrderByDelegate:
|
|
303
301
|
|
304
302
|
@dataclass
|
305
303
|
class LimitDelegate:
|
306
|
-
|
307
304
|
_limit: t.Optional[Limit] = None
|
308
305
|
_first: bool = False
|
309
306
|
|
@@ -330,7 +327,6 @@ class AsOfDelegate:
|
|
330
327
|
|
331
328
|
@dataclass
|
332
329
|
class DistinctDelegate:
|
333
|
-
|
334
330
|
_distinct: Distinct = field(
|
335
331
|
default_factory=lambda: Distinct(enabled=False, on=None)
|
336
332
|
)
|
@@ -356,7 +352,6 @@ class ReturningDelegate:
|
|
356
352
|
|
357
353
|
@dataclass
|
358
354
|
class CountDelegate:
|
359
|
-
|
360
355
|
_count: bool = False
|
361
356
|
|
362
357
|
def count(self):
|
@@ -365,7 +360,6 @@ class CountDelegate:
|
|
365
360
|
|
366
361
|
@dataclass
|
367
362
|
class AddDelegate:
|
368
|
-
|
369
363
|
_add: t.List[Table] = field(default_factory=list)
|
370
364
|
|
371
365
|
def add(self, *instances: Table, table_class: t.Type[Table]):
|
@@ -421,8 +415,7 @@ class OutputDelegate:
|
|
421
415
|
self._output.nested = bool(nested)
|
422
416
|
|
423
417
|
def copy(self) -> OutputDelegate:
|
424
|
-
_output
|
425
|
-
return self.__class__(_output=_output)
|
418
|
+
return self.__class__(_output=self._output.copy())
|
426
419
|
|
427
420
|
|
428
421
|
@dataclass
|
piccolo/schema.py
CHANGED
@@ -10,7 +10,6 @@ from piccolo.utils.sync import run_sync
|
|
10
10
|
|
11
11
|
|
12
12
|
class SchemaDDLBase(abc.ABC):
|
13
|
-
|
14
13
|
db: Engine
|
15
14
|
|
16
15
|
@property
|
@@ -132,16 +131,19 @@ class ListTables:
|
|
132
131
|
self.db = db
|
133
132
|
self.schema_name = schema_name
|
134
133
|
|
135
|
-
async def run(self):
|
136
|
-
response =
|
137
|
-
|
138
|
-
|
134
|
+
async def run(self) -> t.List[str]:
|
135
|
+
response = t.cast(
|
136
|
+
t.List[t.Dict],
|
137
|
+
await self.db.run_querystring(
|
138
|
+
QueryString(
|
139
|
+
"""
|
139
140
|
SELECT table_name
|
140
141
|
FROM information_schema.tables
|
141
142
|
WHERE table_schema = {}
|
142
143
|
""",
|
143
|
-
|
144
|
-
|
144
|
+
self.schema_name,
|
145
|
+
)
|
146
|
+
),
|
145
147
|
)
|
146
148
|
return [i["table_name"] for i in response]
|
147
149
|
|
@@ -156,9 +158,14 @@ class ListSchemas:
|
|
156
158
|
def __init__(self, db: Engine):
|
157
159
|
self.db = db
|
158
160
|
|
159
|
-
async def run(self):
|
160
|
-
response =
|
161
|
-
|
161
|
+
async def run(self) -> t.List[str]:
|
162
|
+
response = t.cast(
|
163
|
+
t.List[t.Dict],
|
164
|
+
await self.db.run_querystring(
|
165
|
+
QueryString(
|
166
|
+
"SELECT schema_name FROM information_schema.schemata"
|
167
|
+
)
|
168
|
+
),
|
162
169
|
)
|
163
170
|
return [i["schema_name"] for i in response]
|
164
171
|
|
@@ -180,7 +187,7 @@ class SchemaManager:
|
|
180
187
|
"""
|
181
188
|
db = db or engine_finder()
|
182
189
|
|
183
|
-
if
|
190
|
+
if db is None:
|
184
191
|
raise ValueError("The DB can't be found.")
|
185
192
|
|
186
193
|
self.db = db
|
piccolo/table.py
CHANGED
@@ -143,8 +143,11 @@ class TableMeta:
|
|
143
143
|
def db(self, value: Engine):
|
144
144
|
self._db = value
|
145
145
|
|
146
|
-
def refresh_db(self):
|
147
|
-
|
146
|
+
def refresh_db(self) -> None:
|
147
|
+
engine = engine_finder()
|
148
|
+
if engine is None:
|
149
|
+
raise ValueError("The engine can't be found")
|
150
|
+
self.db = engine
|
148
151
|
|
149
152
|
def get_column_by_name(self, name: str) -> Column:
|
150
153
|
"""
|
@@ -184,8 +187,8 @@ class TableMeta:
|
|
184
187
|
|
185
188
|
|
186
189
|
class TableMetaclass(type):
|
187
|
-
def __str__(cls):
|
188
|
-
return cls._table_str()
|
190
|
+
def __str__(cls) -> str:
|
191
|
+
return cls._table_str() # type: ignore
|
189
192
|
|
190
193
|
def __repr__(cls):
|
191
194
|
"""
|
@@ -822,7 +825,7 @@ class Table(metaclass=TableMetaclass):
|
|
822
825
|
@classmethod
|
823
826
|
def all_related(
|
824
827
|
cls, exclude: t.Optional[t.List[t.Union[str, ForeignKey]]] = None
|
825
|
-
) -> t.List[
|
828
|
+
) -> t.List[ForeignKey]:
|
826
829
|
"""
|
827
830
|
Used in conjunction with ``objects`` queries. Just as we can use
|
828
831
|
``all_related`` on a ``ForeignKey``, you can also use it for the table
|
@@ -1251,7 +1254,7 @@ class Table(metaclass=TableMetaclass):
|
|
1251
1254
|
@classmethod
|
1252
1255
|
def create_index(
|
1253
1256
|
cls,
|
1254
|
-
columns: t.
|
1257
|
+
columns: t.Union[t.List[Column], t.List[str]],
|
1255
1258
|
method: IndexMethod = IndexMethod.btree,
|
1256
1259
|
if_not_exists: bool = False,
|
1257
1260
|
) -> CreateIndex:
|
@@ -1273,7 +1276,9 @@ class Table(metaclass=TableMetaclass):
|
|
1273
1276
|
|
1274
1277
|
@classmethod
|
1275
1278
|
def drop_index(
|
1276
|
-
cls,
|
1279
|
+
cls,
|
1280
|
+
columns: t.Union[t.List[Column], t.List[str]],
|
1281
|
+
if_exists: bool = True,
|
1277
1282
|
) -> DropIndex:
|
1278
1283
|
"""
|
1279
1284
|
Drop a table index. If multiple columns are specified, this refers
|
@@ -1464,22 +1469,18 @@ async def drop_db_tables(*tables: t.Type[Table]) -> None:
|
|
1464
1469
|
# SQLite doesn't support CASCADE, so we have to drop them in the
|
1465
1470
|
# correct order.
|
1466
1471
|
sorted_table_classes = reversed(sort_table_classes(list(tables)))
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
for table in sorted_table_classes
|
1472
|
-
]
|
1473
|
-
)
|
1472
|
+
ddl_statements = [
|
1473
|
+
Alter(table=table).drop_table(if_exists=True)
|
1474
|
+
for table in sorted_table_classes
|
1475
|
+
]
|
1474
1476
|
else:
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
for table in tables
|
1480
|
-
]
|
1481
|
-
)
|
1477
|
+
ddl_statements = [
|
1478
|
+
table.alter().drop_table(cascade=True, if_exists=True)
|
1479
|
+
for table in tables
|
1480
|
+
]
|
1482
1481
|
|
1482
|
+
atomic = engine.atomic()
|
1483
|
+
atomic.add(*ddl_statements)
|
1483
1484
|
await atomic.run()
|
1484
1485
|
|
1485
1486
|
|
piccolo/utils/encoding.py
CHANGED
@@ -19,13 +19,15 @@ def dump_json(data: t.Any, pretty: bool = False) -> str:
|
|
19
19
|
orjson_params["option"] = (
|
20
20
|
orjson.OPT_INDENT_2 | orjson.OPT_APPEND_NEWLINE # type: ignore
|
21
21
|
)
|
22
|
-
return orjson.dumps(data, **orjson_params).decode(
|
22
|
+
return orjson.dumps(data, **orjson_params).decode( # type: ignore
|
23
|
+
"utf8"
|
24
|
+
)
|
23
25
|
else:
|
24
26
|
params: t.Dict[str, t.Any] = {"default": str}
|
25
27
|
if pretty:
|
26
28
|
params["indent"] = 2
|
27
|
-
return json.dumps(data, **params)
|
29
|
+
return json.dumps(data, **params) # type: ignore
|
28
30
|
|
29
31
|
|
30
32
|
def load_json(data: str) -> t.Any:
|
31
|
-
return orjson.loads(data) if ORJSON else json.loads(data)
|
33
|
+
return orjson.loads(data) if ORJSON else json.loads(data) # type: ignore
|
@@ -1,10 +1,10 @@
|
|
1
|
-
piccolo/__init__.py,sha256
|
1
|
+
piccolo/__init__.py,sha256=-4wiKExnJa5IxSz9dOFdTv99ibuBl-uX3D-HM6f-_V8,23
|
2
2
|
piccolo/custom_types.py,sha256=7HMQAze-5mieNLfbQ5QgbRQgR2abR7ol0qehv2SqROY,604
|
3
3
|
piccolo/main.py,sha256=1VsFV67FWTUikPTysp64Fmgd9QBVa_9wcwKfwj2UCEA,5117
|
4
4
|
piccolo/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
piccolo/querystring.py,sha256=_3enTH0oBx77LfpS9UG_5OGp5fMxmu50Dod5s1Gn9mY,9655
|
6
|
-
piccolo/schema.py,sha256=
|
7
|
-
piccolo/table.py,sha256=
|
6
|
+
piccolo/schema.py,sha256=qNNy4tG_HqnXR9t3hHMgYXtGxHabwQAhUpc6RKLJ_gE,7960
|
7
|
+
piccolo/table.py,sha256=IfXT9rtm1sBN-u_A8-_0gj6fJf3_RGSPtWMJa-FX9jw,49569
|
8
8
|
piccolo/table_reflection.py,sha256=jrN1nHerDJ4tU09GtNN3hz7ap-7rXnSUjljFO6LB2H0,7094
|
9
9
|
piccolo/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
piccolo/apps/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -49,7 +49,7 @@ piccolo/apps/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
49
49
|
piccolo/apps/fixtures/piccolo_app.py,sha256=4O1Cznl1zms2gIw2iVjCjidkgCfFcB83nZIAJwcNTtg,268
|
50
50
|
piccolo/apps/fixtures/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
51
51
|
piccolo/apps/fixtures/commands/dump.py,sha256=UFkpV1e3UtayMf57WvFQbVsYpqFwo_gKoQC7oR3jdzc,3669
|
52
|
-
piccolo/apps/fixtures/commands/load.py,sha256=
|
52
|
+
piccolo/apps/fixtures/commands/load.py,sha256=Qnk8gT9iAcSGac6uALWHY26ikzg2npjGqYHMZGm6hVg,4216
|
53
53
|
piccolo/apps/fixtures/commands/shared.py,sha256=BMG8ku5FyK5vLewaDYwEfe_5HCnEVz1oKxHfL-GpO08,1462
|
54
54
|
piccolo/apps/meta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
55
55
|
piccolo/apps/meta/piccolo_app.py,sha256=EdAB74BvwpwO9L8DOIMXPly9f4hiW3oaWdzoLNNV2a4,224
|
@@ -58,21 +58,21 @@ piccolo/apps/meta/commands/version.py,sha256=iDStZ7FPd5Da0vIAZrvFTCDev2yCtGBzWhl
|
|
58
58
|
piccolo/apps/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
59
59
|
piccolo/apps/migrations/piccolo_app.py,sha256=1EcS2ComBPCaMCC2C3WaPR_GqLwt3XiIJNfm5D2hMgo,593
|
60
60
|
piccolo/apps/migrations/tables.py,sha256=jqBnK-Rk545v1Eu6GaLHTVz7-uwBTUnz2m58OA-mxTc,799
|
61
|
-
piccolo/apps/migrations/auto/__init__.py,sha256=
|
61
|
+
piccolo/apps/migrations/auto/__init__.py,sha256=eYb1rZQaalumv_bhbcEe6x3dUglmpFtw7Egg6k7597U,316
|
62
62
|
piccolo/apps/migrations/auto/diffable_table.py,sha256=FJ_D7FvL_vaThgIY-zFyW_kFmReOI12saM3DFcaAvfw,7058
|
63
|
-
piccolo/apps/migrations/auto/migration_manager.py,sha256=
|
63
|
+
piccolo/apps/migrations/auto/migration_manager.py,sha256=3RuQPjnBfAfETkBdDPAVAXK3Bx-GW-37WL7uYNJ_sxI,35127
|
64
64
|
piccolo/apps/migrations/auto/operations.py,sha256=169IrCLR3FtTRxHsEHNg6dTG45lcEM7Aoyy3SwgX_hU,1329
|
65
65
|
piccolo/apps/migrations/auto/schema_differ.py,sha256=VA1rK-_wNSdyZZgfA3ZOlpVGJCcvLyouKtT9k2YKhiA,26266
|
66
66
|
piccolo/apps/migrations/auto/schema_snapshot.py,sha256=ZqUg4NpChOeoACKF2gkhqsz1BW3wOWFnzJCccq-CNNQ,4719
|
67
67
|
piccolo/apps/migrations/auto/serialisation.py,sha256=nlomUL-TwD_7Gjb8ttRZfIwn9VbNoEmRmD3LElP5e0k,23927
|
68
68
|
piccolo/apps/migrations/auto/serialisation_legacy.py,sha256=Edqx3YL0RGTsTHLNkHRNnXdfX6ut1h65U7UX2cI_BkE,1752
|
69
69
|
piccolo/apps/migrations/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
70
|
-
piccolo/apps/migrations/commands/backwards.py,sha256=
|
71
|
-
piccolo/apps/migrations/commands/base.py,sha256=
|
72
|
-
piccolo/apps/migrations/commands/check.py,sha256=
|
73
|
-
piccolo/apps/migrations/commands/clean.py,sha256=
|
74
|
-
piccolo/apps/migrations/commands/forwards.py,sha256=
|
75
|
-
piccolo/apps/migrations/commands/new.py,sha256=
|
70
|
+
piccolo/apps/migrations/commands/backwards.py,sha256=sBLotsdbwX11dji4H7YWgbaonluZSKBs6V3zFB3l4SY,6654
|
71
|
+
piccolo/apps/migrations/commands/base.py,sha256=iuF5-PppAVt6eOo0EOtISKuVGsfR3VVcyXCzRYNOcj4,4484
|
72
|
+
piccolo/apps/migrations/commands/check.py,sha256=JbzKAR_SFEs5dYvW0J_X4jgIpJDAHLIRz364JIZT6eQ,3991
|
73
|
+
piccolo/apps/migrations/commands/clean.py,sha256=JYs9VwvGN45tXM2iiaqGj3UQFZhJETrWahT0tcpGvBk,2864
|
74
|
+
piccolo/apps/migrations/commands/forwards.py,sha256=Xb_QqkGH3RNaJ256jjLBH8TSykNsnblSw4OPANzmXVA,5413
|
75
|
+
piccolo/apps/migrations/commands/new.py,sha256=k1cXGeydfrr3_kscwtahv7QdJW_DtTlUNHk7WW4Kfr8,7924
|
76
76
|
piccolo/apps/migrations/commands/templates/migration.py.jinja,sha256=wMC8RTIcQj3mjZh3FhuxuIfsqftZ5ivraO9fg-H6fbI,681
|
77
77
|
piccolo/apps/playground/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
78
78
|
piccolo/apps/playground/piccolo_app.py,sha256=zs6nGxt-lgUF8nEwI0uDTNZDKQqjZaNDH8le5RqrMNE,222
|
@@ -87,13 +87,13 @@ piccolo/apps/schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
87
87
|
piccolo/apps/schema/piccolo_app.py,sha256=De9eujzB6zWsP6J1gHYUk_f5_DpjvTZVXJsQ3eXBgnA,432
|
88
88
|
piccolo/apps/schema/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
89
89
|
piccolo/apps/schema/commands/exceptions.py,sha256=ZOGL3iV-xtWbWsImXObrXNaKtNPY_Qk1OmaOMOV6Ps0,236
|
90
|
-
piccolo/apps/schema/commands/generate.py,sha256=
|
90
|
+
piccolo/apps/schema/commands/generate.py,sha256=_niW_UxZ-x29-xjDIVdjHdDyKAaXn4HUDVtVjsXgBD0,30700
|
91
91
|
piccolo/apps/schema/commands/graph.py,sha256=FuQUPavUXpr-Y_11XRr11DbVLsgK8uG0IN8uBZIe5G4,3190
|
92
92
|
piccolo/apps/schema/commands/templates/graphviz.dot.jinja,sha256=-legygtsueOC70aboX35ZJpbCAXcv3E8RXXvFDQTeIY,1443
|
93
93
|
piccolo/apps/shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
94
94
|
piccolo/apps/shell/piccolo_app.py,sha256=LjyAvzNreSkeKM02VzR1E78S6QrcPjy1aGRFP-O4T9c,217
|
95
95
|
piccolo/apps/shell/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
96
|
-
piccolo/apps/shell/commands/run.py,sha256=
|
96
|
+
piccolo/apps/shell/commands/run.py,sha256=BiGMnM0wGKNvZOklgQeU_ZhBYWFxtsTQuvVHdod9Lzc,1628
|
97
97
|
piccolo/apps/sql_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
98
98
|
piccolo/apps/sql_shell/piccolo_app.py,sha256=uFuMQIPLSMYi7y5x3wG1LPqGmEkwC-dYlmLTKrBaUQQ,221
|
99
99
|
piccolo/apps/sql_shell/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -117,58 +117,59 @@ piccolo/apps/user/piccolo_migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
|
|
117
117
|
piccolo/columns/__init__.py,sha256=OYhO_n9anMiU9nL-K6ATq9FhAtm8RyMpqYQ7fTVbhxI,1120
|
118
118
|
piccolo/columns/base.py,sha256=sgMiBvq-xLW6_W86g6XZTMc_3cskyeoMF6yIvIlnXsA,32487
|
119
119
|
piccolo/columns/choices.py,sha256=-HNQuk9vMmVZIPZ5PMeXGTfr23o4nzKPSAkvcG1k0y8,723
|
120
|
-
piccolo/columns/column_types.py,sha256=
|
120
|
+
piccolo/columns/column_types.py,sha256=gwd93EWIULo5pGcuo7wHZdwvFEfFwtBy660pDBVqixw,81921
|
121
121
|
piccolo/columns/combination.py,sha256=vMXC2dfY7pvnCFhsT71XFVyb4gdQzfRsCMaiduu04Ss,6900
|
122
122
|
piccolo/columns/indexes.py,sha256=NfNok3v_791jgDlN28KmhP9ZCjl6031BXmjxV3ovXJk,372
|
123
|
-
piccolo/columns/m2m.py,sha256=
|
123
|
+
piccolo/columns/m2m.py,sha256=17NY0wU7ta2rUTHYUkeA2HQhTDlJ_lyv9FxqvJiiUbY,14602
|
124
124
|
piccolo/columns/readable.py,sha256=hganxUPfIK5ZXn-qgteBxsOJfBJucgr9U0QLsLFYcuI,1562
|
125
125
|
piccolo/columns/reference.py,sha256=FqE9rpMBMwNNkKXR3Wi4ce-fyT2Vh4KM8YpdC21s6gg,3574
|
126
126
|
piccolo/columns/defaults/__init__.py,sha256=7hpB13baEJgc1zbZjRKDFr-5hltxM2VGj8KnKfOiS8c,145
|
127
|
-
piccolo/columns/defaults/base.py,sha256=
|
128
|
-
piccolo/columns/defaults/date.py,sha256=
|
129
|
-
piccolo/columns/defaults/interval.py,sha256=
|
130
|
-
piccolo/columns/defaults/time.py,sha256=
|
131
|
-
piccolo/columns/defaults/timestamp.py,sha256=
|
127
|
+
piccolo/columns/defaults/base.py,sha256=z_ZgtSFbLuwqdYdI7dr2n1SeyTJ7M4Ee4Ki7eRaBlVA,1869
|
128
|
+
piccolo/columns/defaults/date.py,sha256=Duuyi-QJ9Rr72aJkCNnjyO1CJBE-inZNGKnyV8tbLLE,2517
|
129
|
+
piccolo/columns/defaults/interval.py,sha256=ypaQpgDm1AL0WTMFEgKCt0I-e9ADUYdRRSBl65IJdiw,1987
|
130
|
+
piccolo/columns/defaults/time.py,sha256=2e0SDjl9_Mrw2YUeLFXDDYhmlC9Qjek3MkhvmWKQFH0,2417
|
131
|
+
piccolo/columns/defaults/timestamp.py,sha256=3Ng_LJ76nic-3j_AIzZfUvj3djIFRVkps98w1b_2lUM,3565
|
132
132
|
piccolo/columns/defaults/timestamptz.py,sha256=zN945oderS5HU22LMFLcT0iHlYt2wur99w-6lkbmWAI,2057
|
133
|
-
piccolo/columns/defaults/uuid.py,sha256=
|
133
|
+
piccolo/columns/defaults/uuid.py,sha256=zBBaXlUsDTKcxRFDWwqgpiDRrYd7ptxC_hf7UqYhRjY,470
|
134
134
|
piccolo/columns/operators/__init__.py,sha256=fIIm309C7ddqrP-M9oLlfhcZEM4Fx5B203QMzBm0OpM,310
|
135
135
|
piccolo/columns/operators/base.py,sha256=UfaqPd-ieqydrjhvcGYiwHMOKs199tTiT1gFE15DZzo,34
|
136
|
-
piccolo/columns/operators/comparison.py,sha256=
|
136
|
+
piccolo/columns/operators/comparison.py,sha256=G7bI_O-EXqun_zHwbNcZ9z9gsY8OK-0oBKjFqJbHcEc,1338
|
137
137
|
piccolo/columns/operators/math.py,sha256=knsUZzYOVdsFn3bTS0XC0ZzfNObeJcMvZ8Q_QwmGxjU,325
|
138
138
|
piccolo/columns/operators/string.py,sha256=M5ifxHP-ttJaE_wYCl23W5sJof4i5S5_QDIOv34VxDM,142
|
139
139
|
piccolo/conf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
140
|
-
piccolo/conf/apps.py,sha256=
|
140
|
+
piccolo/conf/apps.py,sha256=AlgOM2ePl9NQjME5AQxcZ5RbuQpjRywFCj5uHUsCIZU,19040
|
141
141
|
piccolo/engine/__init__.py,sha256=Z0QR5NAA9jTFenY7pEJv1C8jZXBaFZojBUR3z3nx1cw,283
|
142
|
-
piccolo/engine/base.py,sha256=
|
143
|
-
piccolo/engine/cockroach.py,sha256=
|
142
|
+
piccolo/engine/base.py,sha256=0a2yFX5dxq1A-AKXF-wpeQvYwnl2g437UjgJ37jGV0w,6190
|
143
|
+
piccolo/engine/cockroach.py,sha256=gGnihplotMZMWqHwRnZYnnbKU3jFrwttwOlNtktoeLE,1522
|
144
144
|
piccolo/engine/exceptions.py,sha256=X8xZiTF-L9PIqFT-KDXnv1jFIIOZMF8fYK692chttJE,44
|
145
145
|
piccolo/engine/finder.py,sha256=GjzBNtzRzH79fjtRn7OI3nZiOXE8JfoQWAvHVPrPNx4,507
|
146
|
-
piccolo/engine/postgres.py,sha256=
|
147
|
-
piccolo/engine/sqlite.py,sha256=
|
146
|
+
piccolo/engine/postgres.py,sha256=o1K6i2nhFc5u8mqHQN8KBXXt40djRngwclAnjhVvBgk,18725
|
147
|
+
piccolo/engine/sqlite.py,sha256=KwJc3UttBP_8qSREbLJshqEfROF17ENf0Ju9BwI5_so,25236
|
148
148
|
piccolo/query/__init__.py,sha256=bcsMV4813rMRAIqGv4DxI4eyO4FmpXkDv9dfTk5pt3A,699
|
149
149
|
piccolo/query/base.py,sha256=G8Mwz0GcHY4Xs5Co9ubCNMI-3orfOsDdRDOnFRws7TU,15212
|
150
|
-
piccolo/query/mixins.py,sha256=
|
150
|
+
piccolo/query/mixins.py,sha256=EFEFb9It4y1mR6_JXLn139h5M9KgeP750STYy5M4MLs,21951
|
151
151
|
piccolo/query/proxy.py,sha256=Yq4jNc7IWJvdeO3u7_7iPyRy2WhVj8KsIUcIYHBIi9Q,1839
|
152
|
-
piccolo/query/functions/__init__.py,sha256=
|
152
|
+
piccolo/query/functions/__init__.py,sha256=pZkzOIh7Sg9HPNOeegOwAS46Oxt31ATlSVmwn-lxCbc,605
|
153
153
|
piccolo/query/functions/aggregate.py,sha256=OdjDjr_zyD4S9UbrZ2C3V5mz4OT2sIfAFAdTGr4WL54,4248
|
154
154
|
piccolo/query/functions/base.py,sha256=Go2bg2r7GaVoyyX-wTb80WEQmtiU4OFYWQlq9eQ6Zcc,478
|
155
|
+
piccolo/query/functions/datetime.py,sha256=6YSpc_MiZK_019KUhCo01Ss_1AjXJ31M61R9-zKmoZs,6251
|
155
156
|
piccolo/query/functions/math.py,sha256=2Wapq0lpXZh77z0uzXUhnOfmUkbkM0xjQ4tiyuCsbiE,661
|
156
|
-
piccolo/query/functions/string.py,sha256=
|
157
|
+
piccolo/query/functions/string.py,sha256=X3g_4qomJJCkYOcKcK-zZEqC6qJBrS4VTogPp9Xw4Cs,2506
|
157
158
|
piccolo/query/functions/type_conversion.py,sha256=OYbZc6TEk6b5yTwCMw2rmZ-UiQiUiWZOyxwMLzUjXwE,2583
|
158
159
|
piccolo/query/methods/__init__.py,sha256=tm4gLeV_obDqpgnouVjFbGubbaoJcqm_cbNd4LPo48Q,622
|
159
160
|
piccolo/query/methods/alter.py,sha256=AI9YkJeip2EitrWJN_TDExXhA8HGAG3XuDz1NR-KirQ,16728
|
160
161
|
piccolo/query/methods/count.py,sha256=Vxn_7Ry-rleC6OGRxh-cLbuEMsy1DNjAZJThGED-_do,1748
|
161
162
|
piccolo/query/methods/create.py,sha256=hJ-6VVsWczzKDH6fQRN1WmYhcitixuXJ-eNOuCo_JgM,2742
|
162
|
-
piccolo/query/methods/create_index.py,sha256=
|
163
|
+
piccolo/query/methods/create_index.py,sha256=gip_cRXZkLfpJqCL7KHk2l_7HLptoa-Ae8qu6I5d5c8,2224
|
163
164
|
piccolo/query/methods/delete.py,sha256=3QNh8wsn2hUP1Ce9nz5ps1huU6ySHjyqkjdP-VYN-U8,2234
|
164
|
-
piccolo/query/methods/drop_index.py,sha256=
|
165
|
+
piccolo/query/methods/drop_index.py,sha256=5x3vHpoOmQ1SMhj6L7snKXX6M9l9j1E1PFSO6LMMkpY,1051
|
165
166
|
piccolo/query/methods/exists.py,sha256=lTMjtrFPFygZmaPV3sfQKXc3K0sVqJ2S6PDc3fRK6YQ,1203
|
166
167
|
piccolo/query/methods/indexes.py,sha256=J-QUqaBJwpgahskUH0Cu0Mq7zEKcfVAtDsUVIVX-C4c,943
|
167
168
|
piccolo/query/methods/insert.py,sha256=ssLJ_wn08KnOwwr7t-VILyn1P4hrvM63CfPIcAJWT5k,4701
|
168
|
-
piccolo/query/methods/objects.py,sha256=
|
169
|
+
piccolo/query/methods/objects.py,sha256=iahDUziUtlx7pJ2uBAhdm3hCTmg2AS9C8cal1my5KR0,11705
|
169
170
|
piccolo/query/methods/raw.py,sha256=VhYpCB52mZk4zqFTsqK5CHKTDGskUjISXTBV7UjohmA,600
|
170
171
|
piccolo/query/methods/refresh.py,sha256=P1Eo_HYU_L7kcGM_cvDDgyLi1boCXY7Pc4tv_eDAzvc,2769
|
171
|
-
piccolo/query/methods/select.py,sha256=
|
172
|
+
piccolo/query/methods/select.py,sha256=DjiTTyqoh95nK0m6Ru3UKjzybe1S5JlfeJ9IB2xR4VI,21270
|
172
173
|
piccolo/query/methods/table_exists.py,sha256=0yb3n6Jd2ovSBWlZ-gl00K4E7Jnbj7J8qAAX5d7hvNk,1259
|
173
174
|
piccolo/query/methods/update.py,sha256=LfWqIXEl1aecc0rkVssTFmwyD6wXGhlKcTrUVhtlEsw,3705
|
174
175
|
piccolo/testing/__init__.py,sha256=pRFSqRInfx95AakOq54atmvqoB-ue073q2aR8u8zR40,83
|
@@ -176,7 +177,7 @@ piccolo/testing/model_builder.py,sha256=lVEiEe71xrH8SSjzFc2l0s-VaCXHeg9Bo5oAYOEb
|
|
176
177
|
piccolo/testing/random_builder.py,sha256=0LkGpanQ7P1R82gLIMQyK9cm1LdZkPvxbShTEf3jeH4,2128
|
177
178
|
piccolo/utils/__init__.py,sha256=SDFFraauI9Op8dCRkreQv1dwUcab8Mi1eC-n0EwlTy8,36
|
178
179
|
piccolo/utils/dictionary.py,sha256=8vRPxgaXadDVhqihP1UxL7nUBgM6Gpe_Eu3xJq7zzGM,1886
|
179
|
-
piccolo/utils/encoding.py,sha256=
|
180
|
+
piccolo/utils/encoding.py,sha256=W34oj1F2f8zeirMceHZnAnJL2T8rPoiqXt-DJ-hzRGk,835
|
180
181
|
piccolo/utils/lazy_loader.py,sha256=T8GChEqtKWcBegn-6g_BQ7hOg2Xu1bedFh7Z8E7xcOY,1912
|
181
182
|
piccolo/utils/list.py,sha256=4hPGiksJWxL226W7gyYBcqVGgMTgVa2jP8zvalc3zw8,1541
|
182
183
|
piccolo/utils/naming.py,sha256=d7_mMscguK799RMhxFDifRgn8Ply5wiy2k1KkP22WUs,276
|
@@ -215,7 +216,7 @@ tests/apps/migrations/auto/test_schema_differ.py,sha256=UdsaZisA02j15wr1bXkXD6Cq
|
|
215
216
|
tests/apps/migrations/auto/test_schema_snapshot.py,sha256=ZyvGZqn3N3cwd-3S-FME5AJ8buDSHesw7yPIvY6mE5k,6196
|
216
217
|
tests/apps/migrations/auto/test_serialisation.py,sha256=EFkhES1w9h51UCamWrhxs3mf4I718ggeP7Yl5J_UID4,13548
|
217
218
|
tests/apps/migrations/auto/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
218
|
-
tests/apps/migrations/auto/integration/test_migrations.py,sha256=
|
219
|
+
tests/apps/migrations/auto/integration/test_migrations.py,sha256=t6QK3sSYovc4K68tySUo51H3a6LpubM442agiBYQxZ4,46753
|
219
220
|
tests/apps/migrations/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
220
221
|
tests/apps/migrations/commands/test_base.py,sha256=NgHgVjNd3Hil9eODvW7Ic2D9muTa_grNaH3YpRFfR8I,1829
|
221
222
|
tests/apps/migrations/commands/test_check.py,sha256=hOX_sVk1nfCRfbQ8tJoFEUBFhih9O4QuQLHTp5TQaiY,630
|
@@ -243,7 +244,7 @@ tests/apps/user/commands/test_change_permissions.py,sha256=uVKEiT1EKot3VA2TDETdQ
|
|
243
244
|
tests/apps/user/commands/test_create.py,sha256=iJ3Tti62rHwvdcTwNXrc5JPam6vR1qxKRdMN456vm3o,2250
|
244
245
|
tests/apps/user/commands/test_list.py,sha256=ipPfGdW6fH7q-Jc7JcYUvlioGmH9GQU0WImZGC2m-XQ,2840
|
245
246
|
tests/columns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
246
|
-
tests/columns/test_array.py,sha256=
|
247
|
+
tests/columns/test_array.py,sha256=sHYL2hEMwinoGz2u72Db9P3GxNuuH3oPUwzzKWmzX9s,11691
|
247
248
|
tests/columns/test_base.py,sha256=CTqCNcrqAJTjLXe3MCZgTczrmB3jcVRcOpU4FilpLoQ,3918
|
248
249
|
tests/columns/test_bigint.py,sha256=a0B4y1H02ww5qaW574X2lyenbY6o29ztOhiaqybPC0c,1149
|
249
250
|
tests/columns/test_boolean.py,sha256=kDESp6FnRtSZhuqIu0dBRwKMSpS5TFbbs3sz2MyZSs8,1720
|
@@ -276,13 +277,13 @@ tests/columns/m2m/test_m2m.py,sha256=LtNsHQ8xAzBFLiZVZhWEB56zu25FnaWtzJ62FZH3heI
|
|
276
277
|
tests/columns/m2m/test_m2m_schema.py,sha256=oxu7eAjFFpDjnq9Eq-5OTNmlnsEIMFWx18OItfpVs-s,339
|
277
278
|
tests/conf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
278
279
|
tests/conf/example.py,sha256=K8sTttLpEac8rQlOLDY500IGkHj3P3NoyFbCMnT1EqY,347
|
279
|
-
tests/conf/test_apps.py,sha256=
|
280
|
+
tests/conf/test_apps.py,sha256=Ovdp4v55iC-epS25sKntyYAw2ki9svcyCNOj5rOzE-E,8632
|
280
281
|
tests/engine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
281
282
|
tests/engine/test_extra_nodes.py,sha256=xW5gflHzM6ou26DqRSAZoaAbYVzF1IuMkW3vzNmB954,1298
|
282
283
|
tests/engine/test_logging.py,sha256=VLf9A3QuoV7OhV8lttLDB4gzZemnG63kSr-Uyan005U,1287
|
283
|
-
tests/engine/test_nested_transaction.py,sha256=
|
284
|
+
tests/engine/test_nested_transaction.py,sha256=3J91MvQ_z1d7v-z8_7pAh_zwHGoi_GUtmIDWlGcAZwk,2723
|
284
285
|
tests/engine/test_pool.py,sha256=ylucZNa3eL8cfrLjxPtduLpOdN_Z0e9Z6Rmrz-XpWp8,3890
|
285
|
-
tests/engine/test_transaction.py,sha256=
|
286
|
+
tests/engine/test_transaction.py,sha256=VTfQiQKpl_HtSQig6pl5tmBAP0d81z2djU6sYaxr_zE,9893
|
286
287
|
tests/engine/test_version_parsing.py,sha256=M1LODAVKHfj1apTMOwoC31LcI4vhiJRs1OO6P0WIsmE,793
|
287
288
|
tests/example_apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
288
289
|
tests/example_apps/mega/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -303,9 +304,10 @@ tests/query/test_querystring.py,sha256=QrqyjwUlFlf5LrsJ7DgjCruq811I0UvrDFPud6rfZ
|
|
303
304
|
tests/query/test_slots.py,sha256=I9ZjAYqAJNSFAWg9UyAqy7bm-Z52KiyQ2C_yHk2qqqI,1010
|
304
305
|
tests/query/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
305
306
|
tests/query/functions/base.py,sha256=RLCzLT7iN_Z5DtIFZqVESTJGES2JKb8VDU25sv5OtN4,811
|
307
|
+
tests/query/functions/test_datetime.py,sha256=8GG5ERLq6GM8NqA3J6mycNPfCUMOEICGccyZifiwEqw,2987
|
306
308
|
tests/query/functions/test_functions.py,sha256=510fqRrOrAZ9NyFoZtlF6lIdiiLriWhZ7vvveWZ8rsc,1984
|
307
309
|
tests/query/functions/test_math.py,sha256=Qw2MXqgY_y7vGd0bLtPhWW7HB3tJkot1o-Rh9nCmmBk,1273
|
308
|
-
tests/query/functions/test_string.py,sha256=
|
310
|
+
tests/query/functions/test_string.py,sha256=RMojkBUzw1Ikrb3nTa7VjJ4FsKfrjpuHUyxQDA-F5Cs,1800
|
309
311
|
tests/query/functions/test_type_conversion.py,sha256=WeYR9UfJnbidle07-akQ1g9hFCd93qT8xUhDF3c58n4,3235
|
310
312
|
tests/query/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
311
313
|
tests/query/mixins/test_columns_delegate.py,sha256=Zw9uaqOEb7kpPQzzO9yz0jhQEeCfoPSjsy-BCLg_8XU,2032
|
@@ -324,7 +326,7 @@ tests/table/test_delete.py,sha256=dUfGOz0p0OdwxtWhEH88OXL6zB5sd4ZyKvVmMs08T98,12
|
|
324
326
|
tests/table/test_drop_db_tables.py,sha256=0a_aBZ8BMSLnu_DFXE_29X01B0jLdaa_WQ5_qTaZ5XY,1060
|
325
327
|
tests/table/test_exists.py,sha256=AHvhodkRof7PVd4IDdGQ2nyOj_1Cag1Rpg1H84s4jU0,283
|
326
328
|
tests/table/test_from_dict.py,sha256=I4PMxuzgkgi3-adaw9Gr3u5tQHexc31Vrq7RSPcPcJs,840
|
327
|
-
tests/table/test_indexes.py,sha256=
|
329
|
+
tests/table/test_indexes.py,sha256=VfM2FqFO8OOaL88QYQRqPX_PPniSBoPFeLPjXZ8jHBk,2073
|
328
330
|
tests/table/test_inheritance.py,sha256=AAkhEhhixVGweGe7ckzj-yypW-cj6D88Cca4-pjkwKw,3110
|
329
331
|
tests/table/test_insert.py,sha256=-xaoL6wTNB6UImiCk9NQKQ-B21l96H-9tN2_iEgXu5A,13695
|
330
332
|
tests/table/test_join.py,sha256=Ukgvjc8NweBGHM7fVFytGQYG9P9thRaMeEvWXYs2Qes,15910
|
@@ -358,14 +360,14 @@ tests/utils/test_lazy_loader.py,sha256=wDWhlV2IR6RuTaYCI5eWesz465WqIscYEJjwWnPrh
|
|
358
360
|
tests/utils/test_list.py,sha256=25UoStmrYS_JDOKsXYqTDc3FUkOe3dUcy51r0I6grK0,769
|
359
361
|
tests/utils/test_naming.py,sha256=ncJdzkMHSVFo2YQLkRhY93WJ8_W_j2pW9tHHL_ZgQcs,661
|
360
362
|
tests/utils/test_printing.py,sha256=W8pQyWX2pEkLdMYWxtibFXJnI4MVsb6XMOTo3DZUuZc,668
|
361
|
-
tests/utils/test_pydantic.py,sha256=
|
363
|
+
tests/utils/test_pydantic.py,sha256=TjKai2_TQklwAPGONGFSY4zYkals_bGiKGBCzTH9ntU,27783
|
362
364
|
tests/utils/test_sql_values.py,sha256=vzxRmy16FfLZPH-sAQexBvsF9MXB8n4smr14qoEOS5E,2535
|
363
365
|
tests/utils/test_sync.py,sha256=9ytVo56y2vPQePvTeIi9lHIouEhWJbodl1TmzkGFrSo,799
|
364
366
|
tests/utils/test_table_reflection.py,sha256=SIzuat-IpcVj1GCFyOWKShI8YkhdOPPFH7qVrvfyPNE,3794
|
365
367
|
tests/utils/test_warnings.py,sha256=NvSC_cvJ6uZcwAGf1m-hLzETXCqprXELL8zg3TNLVMw,269
|
366
|
-
piccolo-1.
|
367
|
-
piccolo-1.
|
368
|
-
piccolo-1.
|
369
|
-
piccolo-1.
|
370
|
-
piccolo-1.
|
371
|
-
piccolo-1.
|
368
|
+
piccolo-1.11.0.dist-info/LICENSE,sha256=zFIpi-16uIJ420UMIG75NU0JbDBykvrdnXcj5U_EYBI,1059
|
369
|
+
piccolo-1.11.0.dist-info/METADATA,sha256=th4damYz6EsRNzUVjj7Rkn5Eu3jv1LDiCHAHV-N_piE,5178
|
370
|
+
piccolo-1.11.0.dist-info/WHEEL,sha256=00yskusixUoUt5ob_CiUp6LsnN5lqzTJpoqOFg_FVIc,92
|
371
|
+
piccolo-1.11.0.dist-info/entry_points.txt,sha256=SJPHET4Fi1bN5F3WqcKkv9SClK3_F1I7m4eQjk6AFh0,46
|
372
|
+
piccolo-1.11.0.dist-info/top_level.txt,sha256=-SR74VGbk43VoPy1HH-mHm97yoGukLK87HE5kdBW6qM,24
|
373
|
+
piccolo-1.11.0.dist-info/RECORD,,
|
@@ -145,7 +145,7 @@ class MigrationTestCase(DBTestCase):
|
|
145
145
|
"""
|
146
146
|
app_config = self._get_app_config()
|
147
147
|
|
148
|
-
migrations_folder_path = app_config.
|
148
|
+
migrations_folder_path = app_config.resolved_migrations_folder_path
|
149
149
|
|
150
150
|
if os.path.exists(migrations_folder_path):
|
151
151
|
shutil.rmtree(migrations_folder_path)
|
tests/columns/test_array.py
CHANGED
@@ -157,6 +157,34 @@ class TestArray(TestCase):
|
|
157
157
|
None,
|
158
158
|
)
|
159
159
|
|
160
|
+
@engines_skip("sqlite")
|
161
|
+
@pytest.mark.cockroach_array_slow
|
162
|
+
def test_not_any(self):
|
163
|
+
"""
|
164
|
+
Make sure rows can be retrieved where the array doesn't contain a
|
165
|
+
certain value.
|
166
|
+
|
167
|
+
In CockroachDB <= v22.2.0 we had this error:
|
168
|
+
|
169
|
+
* https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
|
170
|
+
|
171
|
+
In newer CockroachDB versions, it runs but is very slow:
|
172
|
+
|
173
|
+
* https://github.com/piccolo-orm/piccolo/issues/1005
|
174
|
+
|
175
|
+
""" # noqa: E501
|
176
|
+
|
177
|
+
MyTable(value=[1, 2, 3]).save().run_sync()
|
178
|
+
MyTable(value=[4, 5, 6]).save().run_sync()
|
179
|
+
|
180
|
+
# We have to explicitly specify the type, so CockroachDB works.
|
181
|
+
self.assertEqual(
|
182
|
+
MyTable.select(MyTable.value)
|
183
|
+
.where(MyTable.value.not_any(QueryString("{}::INTEGER", 4)))
|
184
|
+
.run_sync(),
|
185
|
+
[{"value": [1, 2, 3]}],
|
186
|
+
)
|
187
|
+
|
160
188
|
@engines_skip("sqlite")
|
161
189
|
@pytest.mark.cockroach_array_slow
|
162
190
|
def test_cat(self):
|
tests/conf/test_apps.py
CHANGED
@@ -85,7 +85,7 @@ class TestAppConfig(TestCase):
|
|
85
85
|
config = AppConfig(
|
86
86
|
app_name="music", migrations_folder_path=pathlib.Path(__file__)
|
87
87
|
)
|
88
|
-
self.assertEqual(config.
|
88
|
+
self.assertEqual(config.resolved_migrations_folder_path, __file__)
|
89
89
|
|
90
90
|
def test_get_table_with_name(self):
|
91
91
|
"""
|
@@ -45,10 +45,12 @@ class TestDifferentDB(TestCase):
|
|
45
45
|
|
46
46
|
self.assertTrue(await Musician.table_exists().run())
|
47
47
|
musician = await Musician.select("name").first().run()
|
48
|
+
assert musician is not None
|
48
49
|
self.assertEqual(musician["name"], "Bob")
|
49
50
|
|
50
51
|
self.assertTrue(await Roadie.table_exists().run())
|
51
52
|
roadie = await Roadie.select("name").first().run()
|
53
|
+
assert roadie is not None
|
52
54
|
self.assertEqual(roadie["name"], "Dave")
|
53
55
|
|
54
56
|
def test_nested(self):
|
tests/engine/test_transaction.py
CHANGED
@@ -4,7 +4,6 @@ from unittest import TestCase
|
|
4
4
|
|
5
5
|
import pytest
|
6
6
|
|
7
|
-
from piccolo.engine.postgres import Atomic
|
8
7
|
from piccolo.engine.sqlite import SQLiteEngine, TransactionType
|
9
8
|
from piccolo.table import drop_db_tables_sync
|
10
9
|
from piccolo.utils.sync import run_sync
|
@@ -58,7 +57,7 @@ class TestAtomic(TestCase):
|
|
58
57
|
engine = Band._meta.db
|
59
58
|
await engine.start_connection_pool()
|
60
59
|
|
61
|
-
atomic
|
60
|
+
atomic = engine.atomic()
|
62
61
|
atomic.add(
|
63
62
|
Manager.create_table(),
|
64
63
|
Band.create_table(),
|