piccolo 1.8.0__py3-none-any.whl → 1.10.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.
Files changed (60) hide show
  1. piccolo/__init__.py +1 -1
  2. piccolo/apps/fixtures/commands/load.py +1 -1
  3. piccolo/apps/migrations/auto/__init__.py +8 -0
  4. piccolo/apps/migrations/auto/migration_manager.py +2 -1
  5. piccolo/apps/migrations/commands/backwards.py +3 -1
  6. piccolo/apps/migrations/commands/base.py +1 -1
  7. piccolo/apps/migrations/commands/check.py +1 -1
  8. piccolo/apps/migrations/commands/clean.py +1 -1
  9. piccolo/apps/migrations/commands/forwards.py +3 -1
  10. piccolo/apps/migrations/commands/new.py +4 -2
  11. piccolo/apps/schema/commands/generate.py +2 -2
  12. piccolo/apps/shell/commands/run.py +1 -1
  13. piccolo/columns/base.py +55 -29
  14. piccolo/columns/column_types.py +28 -4
  15. piccolo/columns/defaults/base.py +6 -4
  16. piccolo/columns/defaults/date.py +9 -1
  17. piccolo/columns/defaults/interval.py +1 -0
  18. piccolo/columns/defaults/time.py +9 -1
  19. piccolo/columns/defaults/timestamp.py +1 -0
  20. piccolo/columns/defaults/uuid.py +1 -1
  21. piccolo/columns/m2m.py +7 -7
  22. piccolo/columns/operators/comparison.py +4 -0
  23. piccolo/conf/apps.py +9 -4
  24. piccolo/engine/base.py +69 -20
  25. piccolo/engine/cockroach.py +2 -3
  26. piccolo/engine/postgres.py +33 -19
  27. piccolo/engine/sqlite.py +27 -22
  28. piccolo/query/functions/__init__.py +5 -0
  29. piccolo/query/functions/math.py +48 -0
  30. piccolo/query/methods/create_index.py +1 -1
  31. piccolo/query/methods/drop_index.py +1 -1
  32. piccolo/query/methods/objects.py +7 -7
  33. piccolo/query/methods/select.py +13 -7
  34. piccolo/query/mixins.py +3 -10
  35. piccolo/querystring.py +18 -0
  36. piccolo/schema.py +20 -12
  37. piccolo/table.py +22 -21
  38. piccolo/utils/encoding.py +5 -3
  39. {piccolo-1.8.0.dist-info → piccolo-1.10.0.dist-info}/METADATA +1 -1
  40. {piccolo-1.8.0.dist-info → piccolo-1.10.0.dist-info}/RECORD +59 -52
  41. tests/apps/migrations/auto/integration/test_migrations.py +1 -1
  42. tests/columns/test_array.py +91 -19
  43. tests/columns/test_get_sql_value.py +66 -0
  44. tests/conf/test_apps.py +1 -1
  45. tests/engine/test_nested_transaction.py +2 -0
  46. tests/engine/test_transaction.py +1 -2
  47. tests/query/functions/__init__.py +0 -0
  48. tests/query/functions/base.py +34 -0
  49. tests/query/functions/test_functions.py +64 -0
  50. tests/query/functions/test_math.py +39 -0
  51. tests/query/functions/test_string.py +25 -0
  52. tests/query/functions/test_type_conversion.py +134 -0
  53. tests/query/test_querystring.py +136 -0
  54. tests/table/test_indexes.py +4 -2
  55. tests/utils/test_pydantic.py +70 -29
  56. tests/query/test_functions.py +0 -238
  57. {piccolo-1.8.0.dist-info → piccolo-1.10.0.dist-info}/LICENSE +0 -0
  58. {piccolo-1.8.0.dist-info → piccolo-1.10.0.dist-info}/WHEEL +0 -0
  59. {piccolo-1.8.0.dist-info → piccolo-1.10.0.dist-info}/entry_points.txt +0 -0
  60. {piccolo-1.8.0.dist-info → piccolo-1.10.0.dist-info}/top_level.txt +0 -0
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
- self.db = engine_finder()
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[Column]:
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.List[t.Union[Column, str]],
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, columns: t.List[t.Union[Column, str]], if_exists: bool = True
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
- atomic = engine.atomic()
1468
- atomic.add(
1469
- *[
1470
- Alter(table=table).drop_table(if_exists=True)
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
- atomic = engine.atomic()
1476
- atomic.add(
1477
- *[
1478
- table.alter().drop_table(cascade=True, if_exists=True)
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("utf8")
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: piccolo
3
- Version: 1.8.0
3
+ Version: 1.10.0
4
4
  Summary: A fast, user friendly ORM and query builder which supports asyncio.
5
5
  Home-page: https://github.com/piccolo-orm/piccolo
6
6
  Author: Daniel Townsend
@@ -1,10 +1,10 @@
1
- piccolo/__init__.py,sha256=mRuIID3n4xkvLnANZAYlJEC5QgpM7rOXi2uxp1_jzHg,22
1
+ piccolo/__init__.py,sha256=PUFn6Nk_mmFhCKTk02g04j8puY3N7KoIIwdxhzTnVRU,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
- piccolo/querystring.py,sha256=Mn00hb4HGOe9MIR7WOhJ3qO1uNex21zj0m2heOeDvZk,9057
6
- piccolo/schema.py,sha256=aWPuZxEulgBRD5NTqKN-RAZchxu-PoIrn0iFrWGZuq4,7731
7
- piccolo/table.py,sha256=DJT8jTgirPpzkydjSzaCgcG0DiC75XRtW_xtFqTyg80,49457
5
+ piccolo/querystring.py,sha256=_3enTH0oBx77LfpS9UG_5OGp5fMxmu50Dod5s1Gn9mY,9655
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=QgC_JKgWMZJnQcwUPbJua_ZAjsT3UAIoOVdF4gpjEL4,4212
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=5bgdh5EsROSvq4rrZAxpzmXiJNj5LJKwf06dxI2LZsc,191
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=tnbQaB46v3bXVSVTkZUExH2KzknZfgM427j4jg68xC8,35096
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=i96eR6_P7IJQDtbaPmIleDg0nCoZubP2P2hNOLtbbT8,6615
71
- piccolo/apps/migrations/commands/base.py,sha256=v-uEfoSNpiHJivBO1YUc3yyDqwXyADIl53xNo_LnRZM,4475
72
- piccolo/apps/migrations/commands/check.py,sha256=VdaIjs3FFy_nwN6kjGKMoVQ4zp1Bdoej756UJBj79Pk,3982
73
- piccolo/apps/migrations/commands/clean.py,sha256=XD4xqtqkL5ZqnwIghzo5Yo2UnBAeznBVyrTiw6SnaCQ,2855
74
- piccolo/apps/migrations/commands/forwards.py,sha256=WLRgIZ19pShsuk8dk4emJkxDz_lRVI27TBZqKjHXS2A,5374
75
- piccolo/apps/migrations/commands/new.py,sha256=WL8skWg-ZPOfkQHPgDbq388qdpvvhTZaXV6y1tGzEoc,7892
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=TV0a9IQSSBLn1hVfNENKP1j4gu_8Tghu5A4PyL21oPM,30638
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=K8Eg8FKiGjWGswBk10q88PwMAraewN6KBlIofRzcZm8,1612
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
@@ -115,59 +115,60 @@ piccolo/apps/user/piccolo_migrations/2020-06-11T21-38-55.py,sha256=JG_LFPrEljnSE
115
115
  piccolo/apps/user/piccolo_migrations/2021-04-30T16-14-15.py,sha256=Y_Dj4ROSxjnPsRDqcnpWeyk8UpF8c80T08_O2uq-GoA,1219
116
116
  piccolo/apps/user/piccolo_migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
117
  piccolo/columns/__init__.py,sha256=OYhO_n9anMiU9nL-K6ATq9FhAtm8RyMpqYQ7fTVbhxI,1120
118
- piccolo/columns/base.py,sha256=FuMLSplFuNoK919nkas2Fn4kZjmPLMmutc4cRtmLhyY,31378
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=CzbNnP_VWvz6_r4aaRcMHiHZOaWHeq5IGaN8WJ7JGPA,81685
120
+ piccolo/columns/column_types.py,sha256=YmltgnWhGLpmuMRimPPVQFmzF5hRDB7K1LaAjcI4Lmc,82364
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=vRJZqBcBP3TQ9Mmb7UEqTgg0QoxIIjIu6JfGLAi4X8Q,14595
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=kxh5jgU9G1zpcncmqISZgwMeHnNPBgNCvuqPPQYO_zs,1854
128
- piccolo/columns/defaults/date.py,sha256=7tW_tTfsnzU8LXn9Qkrtk8OPyi80SESa-dY_UMlNTp0,2455
129
- piccolo/columns/defaults/interval.py,sha256=QTx-iW0J5Eogv72_xXg8hWHEqbRx7jyTxrrV-eIq9HI,1947
130
- piccolo/columns/defaults/time.py,sha256=UEtfdMkn8YdlzyEmqO6DrVnuwZrYUrvG_gTJ-SOMmwk,2355
131
- piccolo/columns/defaults/timestamp.py,sha256=F1Lp3-hnXoP8am8T2soji4GarjVQ2Fg7M9oO9N50oek,3526
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=zq6_uflHKTwbou1FpZFrJYQ8eRgA224KPfjgUE38T7M,443
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=7QyBNQypMP5uG--Vnq3wI1tuAJ0pNO3hG11X2EtFasY,1253
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=CtyysnDNkf9ar7Zue12vrulm6npBuxe5jo2AvNdLoQk,18904
140
+ piccolo/conf/apps.py,sha256=AlgOM2ePl9NQjME5AQxcZ5RbuQpjRywFCj5uHUsCIZU,19040
141
141
  piccolo/engine/__init__.py,sha256=Z0QR5NAA9jTFenY7pEJv1C8jZXBaFZojBUR3z3nx1cw,283
142
- piccolo/engine/base.py,sha256=48swk-AFcsRjFUichSwX6HCagDMVbP0mFB1ueQCXO-o,4881
143
- piccolo/engine/cockroach.py,sha256=7anXR3JPpGuR6-OpDLHM0FxKZhjuTvbRUuZV6fv9lXU,1556
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=zUY6x52QrZ8waiqEUuqlVFiXyzAXrsFi3PY5EJnv3DM,18276
147
- piccolo/engine/sqlite.py,sha256=edwACs4RWsbzgoozBJRN5l9_Vq4nCMefRRLzuZYsF7M,25033
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=1RyhORDRwTZF9m_2uEgc6sOSd2uViXivBAaFN8geq5g,21982
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=9ikQo6qPkCBaWSiuimEACWbYRk9KHoLboRsEC1VcSVw,312
152
+ piccolo/query/functions/__init__.py,sha256=e-BEHlGR3JhE2efWG_rmXdURKL4Fa8tjdGmPsvH4kWo,403
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/math.py,sha256=2Wapq0lpXZh77z0uzXUhnOfmUkbkM0xjQ4tiyuCsbiE,661
155
156
  piccolo/query/functions/string.py,sha256=srxsQJFS6L4gPvFjvuAFQj7QtnCF7X6YoJNKARR2XP0,1236
156
157
  piccolo/query/functions/type_conversion.py,sha256=OYbZc6TEk6b5yTwCMw2rmZ-UiQiUiWZOyxwMLzUjXwE,2583
157
158
  piccolo/query/methods/__init__.py,sha256=tm4gLeV_obDqpgnouVjFbGubbaoJcqm_cbNd4LPo48Q,622
158
159
  piccolo/query/methods/alter.py,sha256=AI9YkJeip2EitrWJN_TDExXhA8HGAG3XuDz1NR-KirQ,16728
159
160
  piccolo/query/methods/count.py,sha256=Vxn_7Ry-rleC6OGRxh-cLbuEMsy1DNjAZJThGED-_do,1748
160
161
  piccolo/query/methods/create.py,sha256=hJ-6VVsWczzKDH6fQRN1WmYhcitixuXJ-eNOuCo_JgM,2742
161
- piccolo/query/methods/create_index.py,sha256=RV9yVHwPvfQCk-g6YpmUTKamgOj0uxWe8Zr97YHIPGo,2216
162
+ piccolo/query/methods/create_index.py,sha256=gip_cRXZkLfpJqCL7KHk2l_7HLptoa-Ae8qu6I5d5c8,2224
162
163
  piccolo/query/methods/delete.py,sha256=3QNh8wsn2hUP1Ce9nz5ps1huU6ySHjyqkjdP-VYN-U8,2234
163
- piccolo/query/methods/drop_index.py,sha256=SOX5wfm-Tbb5TrN6kaLRVHUWdEhyrmCQwF33JfWdtwE,1043
164
+ piccolo/query/methods/drop_index.py,sha256=5x3vHpoOmQ1SMhj6L7snKXX6M9l9j1E1PFSO6LMMkpY,1051
164
165
  piccolo/query/methods/exists.py,sha256=lTMjtrFPFygZmaPV3sfQKXc3K0sVqJ2S6PDc3fRK6YQ,1203
165
166
  piccolo/query/methods/indexes.py,sha256=J-QUqaBJwpgahskUH0Cu0Mq7zEKcfVAtDsUVIVX-C4c,943
166
167
  piccolo/query/methods/insert.py,sha256=ssLJ_wn08KnOwwr7t-VILyn1P4hrvM63CfPIcAJWT5k,4701
167
- piccolo/query/methods/objects.py,sha256=Kw0T1LB4qQkV5vQDKb6HxRw90qDUq6Fgp95_ayX6buo,11727
168
+ piccolo/query/methods/objects.py,sha256=iahDUziUtlx7pJ2uBAhdm3hCTmg2AS9C8cal1my5KR0,11705
168
169
  piccolo/query/methods/raw.py,sha256=VhYpCB52mZk4zqFTsqK5CHKTDGskUjISXTBV7UjohmA,600
169
170
  piccolo/query/methods/refresh.py,sha256=P1Eo_HYU_L7kcGM_cvDDgyLi1boCXY7Pc4tv_eDAzvc,2769
170
- piccolo/query/methods/select.py,sha256=soeBlUXMKvKdmHOkur1O7SOnCpHjRD1tCD4W-fKrLdg,21053
171
+ piccolo/query/methods/select.py,sha256=DjiTTyqoh95nK0m6Ru3UKjzybe1S5JlfeJ9IB2xR4VI,21270
171
172
  piccolo/query/methods/table_exists.py,sha256=0yb3n6Jd2ovSBWlZ-gl00K4E7Jnbj7J8qAAX5d7hvNk,1259
172
173
  piccolo/query/methods/update.py,sha256=LfWqIXEl1aecc0rkVssTFmwyD6wXGhlKcTrUVhtlEsw,3705
173
174
  piccolo/testing/__init__.py,sha256=pRFSqRInfx95AakOq54atmvqoB-ue073q2aR8u8zR40,83
@@ -175,7 +176,7 @@ piccolo/testing/model_builder.py,sha256=lVEiEe71xrH8SSjzFc2l0s-VaCXHeg9Bo5oAYOEb
175
176
  piccolo/testing/random_builder.py,sha256=0LkGpanQ7P1R82gLIMQyK9cm1LdZkPvxbShTEf3jeH4,2128
176
177
  piccolo/utils/__init__.py,sha256=SDFFraauI9Op8dCRkreQv1dwUcab8Mi1eC-n0EwlTy8,36
177
178
  piccolo/utils/dictionary.py,sha256=8vRPxgaXadDVhqihP1UxL7nUBgM6Gpe_Eu3xJq7zzGM,1886
178
- piccolo/utils/encoding.py,sha256=k6DYUxOsfM9mIVZ2PWFomla1BfXngaKUb9QBoZtIgk8,765
179
+ piccolo/utils/encoding.py,sha256=W34oj1F2f8zeirMceHZnAnJL2T8rPoiqXt-DJ-hzRGk,835
179
180
  piccolo/utils/lazy_loader.py,sha256=T8GChEqtKWcBegn-6g_BQ7hOg2Xu1bedFh7Z8E7xcOY,1912
180
181
  piccolo/utils/list.py,sha256=4hPGiksJWxL226W7gyYBcqVGgMTgVa2jP8zvalc3zw8,1541
181
182
  piccolo/utils/naming.py,sha256=d7_mMscguK799RMhxFDifRgn8Ply5wiy2k1KkP22WUs,276
@@ -214,7 +215,7 @@ tests/apps/migrations/auto/test_schema_differ.py,sha256=UdsaZisA02j15wr1bXkXD6Cq
214
215
  tests/apps/migrations/auto/test_schema_snapshot.py,sha256=ZyvGZqn3N3cwd-3S-FME5AJ8buDSHesw7yPIvY6mE5k,6196
215
216
  tests/apps/migrations/auto/test_serialisation.py,sha256=EFkhES1w9h51UCamWrhxs3mf4I718ggeP7Yl5J_UID4,13548
216
217
  tests/apps/migrations/auto/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
217
- tests/apps/migrations/auto/integration/test_migrations.py,sha256=7rmATPGZNuchabUb2y5C9QMmv6XFChn5EHlYoRVChd4,46744
218
+ tests/apps/migrations/auto/integration/test_migrations.py,sha256=t6QK3sSYovc4K68tySUo51H3a6LpubM442agiBYQxZ4,46753
218
219
  tests/apps/migrations/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
219
220
  tests/apps/migrations/commands/test_base.py,sha256=NgHgVjNd3Hil9eODvW7Ic2D9muTa_grNaH3YpRFfR8I,1829
220
221
  tests/apps/migrations/commands/test_check.py,sha256=hOX_sVk1nfCRfbQ8tJoFEUBFhih9O4QuQLHTp5TQaiY,630
@@ -242,7 +243,7 @@ tests/apps/user/commands/test_change_permissions.py,sha256=uVKEiT1EKot3VA2TDETdQ
242
243
  tests/apps/user/commands/test_create.py,sha256=iJ3Tti62rHwvdcTwNXrc5JPam6vR1qxKRdMN456vm3o,2250
243
244
  tests/apps/user/commands/test_list.py,sha256=ipPfGdW6fH7q-Jc7JcYUvlioGmH9GQU0WImZGC2m-XQ,2840
244
245
  tests/columns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
245
- tests/columns/test_array.py,sha256=Kd8yy3C4cXJIgutY-cv0MrE4mvgr52qqVUdkcazW_uI,9298
246
+ tests/columns/test_array.py,sha256=sHYL2hEMwinoGz2u72Db9P3GxNuuH3oPUwzzKWmzX9s,11691
246
247
  tests/columns/test_base.py,sha256=CTqCNcrqAJTjLXe3MCZgTczrmB3jcVRcOpU4FilpLoQ,3918
247
248
  tests/columns/test_bigint.py,sha256=a0B4y1H02ww5qaW574X2lyenbY6o29ztOhiaqybPC0c,1149
248
249
  tests/columns/test_boolean.py,sha256=kDESp6FnRtSZhuqIu0dBRwKMSpS5TFbbs3sz2MyZSs8,1720
@@ -253,6 +254,7 @@ tests/columns/test_date.py,sha256=lz3AF64CkQzulfniGs0fxuvbH2grR3pF2sxipXiyvHU,12
253
254
  tests/columns/test_db_column_name.py,sha256=v0QFOQp_atqzMB1n40simVwHeBDi5nyN1N2bSPX5k6w,7670
254
255
  tests/columns/test_defaults.py,sha256=rwlU1fXt3cCl7C51eLlZXqgWkE-K5W0pHvTrwkAKyCo,2896
255
256
  tests/columns/test_double_precision.py,sha256=CuobfnQnuwqAIuuOPoh2mKHnY9A7gZosoMIGpY-ubfE,639
257
+ tests/columns/test_get_sql_value.py,sha256=mKgsInN374jzV99y9mg_ZiG-AvnJgz36SZi89xL7RZM,1768
256
258
  tests/columns/test_interval.py,sha256=SbeRgTBWPBL5_LYQUdaP3qyN6eTNtTJtu8JXWollhQw,2993
257
259
  tests/columns/test_json.py,sha256=ErGytVqMVO86YiqGmQIcqb2zUcAUY_ya-cY9tSKKXhQ,3920
258
260
  tests/columns/test_jsonb.py,sha256=7MeH0h2SJt_uCUL6D5-6DLTBPlaz6qKSJcnyhuwvzHg,6914
@@ -274,13 +276,13 @@ tests/columns/m2m/test_m2m.py,sha256=LtNsHQ8xAzBFLiZVZhWEB56zu25FnaWtzJ62FZH3heI
274
276
  tests/columns/m2m/test_m2m_schema.py,sha256=oxu7eAjFFpDjnq9Eq-5OTNmlnsEIMFWx18OItfpVs-s,339
275
277
  tests/conf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
276
278
  tests/conf/example.py,sha256=K8sTttLpEac8rQlOLDY500IGkHj3P3NoyFbCMnT1EqY,347
277
- tests/conf/test_apps.py,sha256=aUKH74siXYlrxrjwPMUQi3Xm1LWK9PGh-lulSTwwGsk,8623
279
+ tests/conf/test_apps.py,sha256=Ovdp4v55iC-epS25sKntyYAw2ki9svcyCNOj5rOzE-E,8632
278
280
  tests/engine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
279
281
  tests/engine/test_extra_nodes.py,sha256=xW5gflHzM6ou26DqRSAZoaAbYVzF1IuMkW3vzNmB954,1298
280
282
  tests/engine/test_logging.py,sha256=VLf9A3QuoV7OhV8lttLDB4gzZemnG63kSr-Uyan005U,1287
281
- tests/engine/test_nested_transaction.py,sha256=fsAgVPYbN6VQDnQXuzb7xKgtE9S9Hve0MPvHiTqCfF0,2653
283
+ tests/engine/test_nested_transaction.py,sha256=3J91MvQ_z1d7v-z8_7pAh_zwHGoi_GUtmIDWlGcAZwk,2723
282
284
  tests/engine/test_pool.py,sha256=ylucZNa3eL8cfrLjxPtduLpOdN_Z0e9Z6Rmrz-XpWp8,3890
283
- tests/engine/test_transaction.py,sha256=1tO6FDgoF_oHyutIe1KtyjMgiXR2Yll50JltjMtZptE,9944
285
+ tests/engine/test_transaction.py,sha256=VTfQiQKpl_HtSQig6pl5tmBAP0d81z2djU6sYaxr_zE,9893
284
286
  tests/engine/test_version_parsing.py,sha256=M1LODAVKHfj1apTMOwoC31LcI4vhiJRs1OO6P0WIsmE,793
285
287
  tests/example_apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
286
288
  tests/example_apps/mega/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -296,10 +298,15 @@ tests/query/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
296
298
  tests/query/test_await.py,sha256=imGazmG0l4qilveNPwsxvYQogFJtos4YB8N9iggPEFU,412
297
299
  tests/query/test_camelcase.py,sha256=AcL2gZera1GfpVJNpuKuh5ZBosNCY_ezPWh6-duU5vU,1765
298
300
  tests/query/test_freeze.py,sha256=p3iXqHzgV39YWlqzXtZvaDa7iKZaaaelOGX3UZ8CMf0,3887
299
- tests/query/test_functions.py,sha256=B_M-giOf1xGvdCaYgJdKWLSoV8vtTiRQtEyvL4-7eCY,6401
300
301
  tests/query/test_gather.py,sha256=okWANrBoh0Ut1RomWoffiWNpFqiITF6qti-Aa3uYtRk,730
301
- tests/query/test_querystring.py,sha256=hHljfdnOTlwIMs-7Q2yP5YekYXTT2It-Q-3mP6T9e58,880
302
+ tests/query/test_querystring.py,sha256=QrqyjwUlFlf5LrsJ7DgjCruq811I0UvrDFPud6rfZNI,5019
302
303
  tests/query/test_slots.py,sha256=I9ZjAYqAJNSFAWg9UyAqy7bm-Z52KiyQ2C_yHk2qqqI,1010
304
+ tests/query/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
305
+ tests/query/functions/base.py,sha256=RLCzLT7iN_Z5DtIFZqVESTJGES2JKb8VDU25sv5OtN4,811
306
+ tests/query/functions/test_functions.py,sha256=510fqRrOrAZ9NyFoZtlF6lIdiiLriWhZ7vvveWZ8rsc,1984
307
+ tests/query/functions/test_math.py,sha256=Qw2MXqgY_y7vGd0bLtPhWW7HB3tJkot1o-Rh9nCmmBk,1273
308
+ tests/query/functions/test_string.py,sha256=7yNkpWNBaIowzXTP_qbmQg-mJZLWrTk0lx2mgY1NIfA,825
309
+ tests/query/functions/test_type_conversion.py,sha256=WeYR9UfJnbidle07-akQ1g9hFCd93qT8xUhDF3c58n4,3235
303
310
  tests/query/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
304
311
  tests/query/mixins/test_columns_delegate.py,sha256=Zw9uaqOEb7kpPQzzO9yz0jhQEeCfoPSjsy-BCLg_8XU,2032
305
312
  tests/query/mixins/test_order_by_delegate.py,sha256=mOV3Gxs0XeliONxjWSOniI1z6lbZ_xTfcGYd53JLnaY,507
@@ -317,7 +324,7 @@ tests/table/test_delete.py,sha256=dUfGOz0p0OdwxtWhEH88OXL6zB5sd4ZyKvVmMs08T98,12
317
324
  tests/table/test_drop_db_tables.py,sha256=0a_aBZ8BMSLnu_DFXE_29X01B0jLdaa_WQ5_qTaZ5XY,1060
318
325
  tests/table/test_exists.py,sha256=AHvhodkRof7PVd4IDdGQ2nyOj_1Cag1Rpg1H84s4jU0,283
319
326
  tests/table/test_from_dict.py,sha256=I4PMxuzgkgi3-adaw9Gr3u5tQHexc31Vrq7RSPcPcJs,840
320
- tests/table/test_indexes.py,sha256=GdlPfLmvM0s2fe-4-2XSqQLYYjwsBu5dzf6o7ZvlPj4,1990
327
+ tests/table/test_indexes.py,sha256=VfM2FqFO8OOaL88QYQRqPX_PPniSBoPFeLPjXZ8jHBk,2073
321
328
  tests/table/test_inheritance.py,sha256=AAkhEhhixVGweGe7ckzj-yypW-cj6D88Cca4-pjkwKw,3110
322
329
  tests/table/test_insert.py,sha256=-xaoL6wTNB6UImiCk9NQKQ-B21l96H-9tN2_iEgXu5A,13695
323
330
  tests/table/test_join.py,sha256=Ukgvjc8NweBGHM7fVFytGQYG9P9thRaMeEvWXYs2Qes,15910
@@ -351,14 +358,14 @@ tests/utils/test_lazy_loader.py,sha256=wDWhlV2IR6RuTaYCI5eWesz465WqIscYEJjwWnPrh
351
358
  tests/utils/test_list.py,sha256=25UoStmrYS_JDOKsXYqTDc3FUkOe3dUcy51r0I6grK0,769
352
359
  tests/utils/test_naming.py,sha256=ncJdzkMHSVFo2YQLkRhY93WJ8_W_j2pW9tHHL_ZgQcs,661
353
360
  tests/utils/test_printing.py,sha256=W8pQyWX2pEkLdMYWxtibFXJnI4MVsb6XMOTo3DZUuZc,668
354
- tests/utils/test_pydantic.py,sha256=PU7y34fZNGagJvw78PV4AJ-4SrI6rRxevjIJxIkZE-k,26623
361
+ tests/utils/test_pydantic.py,sha256=TjKai2_TQklwAPGONGFSY4zYkals_bGiKGBCzTH9ntU,27783
355
362
  tests/utils/test_sql_values.py,sha256=vzxRmy16FfLZPH-sAQexBvsF9MXB8n4smr14qoEOS5E,2535
356
363
  tests/utils/test_sync.py,sha256=9ytVo56y2vPQePvTeIi9lHIouEhWJbodl1TmzkGFrSo,799
357
364
  tests/utils/test_table_reflection.py,sha256=SIzuat-IpcVj1GCFyOWKShI8YkhdOPPFH7qVrvfyPNE,3794
358
365
  tests/utils/test_warnings.py,sha256=NvSC_cvJ6uZcwAGf1m-hLzETXCqprXELL8zg3TNLVMw,269
359
- piccolo-1.8.0.dist-info/LICENSE,sha256=zFIpi-16uIJ420UMIG75NU0JbDBykvrdnXcj5U_EYBI,1059
360
- piccolo-1.8.0.dist-info/METADATA,sha256=Uoe1LLvND5fOBdQKOSgFI1T047qzIlbICmwXV1zg7e4,5177
361
- piccolo-1.8.0.dist-info/WHEEL,sha256=00yskusixUoUt5ob_CiUp6LsnN5lqzTJpoqOFg_FVIc,92
362
- piccolo-1.8.0.dist-info/entry_points.txt,sha256=SJPHET4Fi1bN5F3WqcKkv9SClK3_F1I7m4eQjk6AFh0,46
363
- piccolo-1.8.0.dist-info/top_level.txt,sha256=-SR74VGbk43VoPy1HH-mHm97yoGukLK87HE5kdBW6qM,24
364
- piccolo-1.8.0.dist-info/RECORD,,
366
+ piccolo-1.10.0.dist-info/LICENSE,sha256=zFIpi-16uIJ420UMIG75NU0JbDBykvrdnXcj5U_EYBI,1059
367
+ piccolo-1.10.0.dist-info/METADATA,sha256=iOzLZbrVstdxKNx_ifn_M7voMrX0KkQsBcPB39vw0VE,5178
368
+ piccolo-1.10.0.dist-info/WHEEL,sha256=00yskusixUoUt5ob_CiUp6LsnN5lqzTJpoqOFg_FVIc,92
369
+ piccolo-1.10.0.dist-info/entry_points.txt,sha256=SJPHET4Fi1bN5F3WqcKkv9SClK3_F1I7m4eQjk6AFh0,46
370
+ piccolo-1.10.0.dist-info/top_level.txt,sha256=-SR74VGbk43VoPy1HH-mHm97yoGukLK87HE5kdBW6qM,24
371
+ piccolo-1.10.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.migrations_folder_path
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)
@@ -1,6 +1,8 @@
1
1
  import datetime
2
2
  from unittest import TestCase
3
3
 
4
+ import pytest
5
+
4
6
  from piccolo.columns.column_types import (
5
7
  Array,
6
8
  BigInt,
@@ -10,8 +12,9 @@ from piccolo.columns.column_types import (
10
12
  Timestamp,
11
13
  Timestamptz,
12
14
  )
15
+ from piccolo.querystring import QueryString
13
16
  from piccolo.table import Table
14
- from tests.base import engines_only, sqlite_only
17
+ from tests.base import engines_only, engines_skip, sqlite_only
15
18
 
16
19
 
17
20
  class MyTable(Table):
@@ -40,12 +43,18 @@ class TestArray(TestCase):
40
43
  def tearDown(self):
41
44
  MyTable.alter().drop_table().run_sync()
42
45
 
43
- @engines_only("postgres", "sqlite")
46
+ @pytest.mark.cockroach_array_slow
44
47
  def test_storage(self):
45
48
  """
46
49
  Make sure data can be stored and retrieved.
47
50
 
48
- 🐛 Cockroach bug: https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
51
+ In CockroachDB <= v22.2.0 we had this error:
52
+
53
+ * https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
54
+
55
+ In newer CockroachDB versions, it runs but is very slow:
56
+
57
+ * https://github.com/piccolo-orm/piccolo/issues/1005
49
58
 
50
59
  """ # noqa: E501
51
60
  MyTable(value=[1, 2, 3]).save().run_sync()
@@ -54,12 +63,19 @@ class TestArray(TestCase):
54
63
  assert row is not None
55
64
  self.assertEqual(row.value, [1, 2, 3])
56
65
 
57
- @engines_only("postgres")
66
+ @engines_skip("sqlite")
67
+ @pytest.mark.cockroach_array_slow
58
68
  def test_index(self):
59
69
  """
60
70
  Indexes should allow individual array elements to be queried.
61
71
 
62
- 🐛 Cockroach bug: https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
72
+ In CockroachDB <= v22.2.0 we had this error:
73
+
74
+ * https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
75
+
76
+ In newer CockroachDB versions, it runs but is very slow:
77
+
78
+ * https://github.com/piccolo-orm/piccolo/issues/1005
63
79
 
64
80
  """ # noqa: E501
65
81
  MyTable(value=[1, 2, 3]).save().run_sync()
@@ -68,66 +84,120 @@ class TestArray(TestCase):
68
84
  MyTable.select(MyTable.value[0]).first().run_sync(), {"value": 1}
69
85
  )
70
86
 
71
- @engines_only("postgres")
87
+ @engines_skip("sqlite")
88
+ @pytest.mark.cockroach_array_slow
72
89
  def test_all(self):
73
90
  """
74
91
  Make sure rows can be retrieved where all items in an array match a
75
92
  given value.
76
93
 
77
- 🐛 Cockroach bug: https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
94
+ In CockroachDB <= v22.2.0 we had this error:
95
+
96
+ * https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
97
+
98
+ In newer CockroachDB versions, it runs but is very slow:
99
+
100
+ * https://github.com/piccolo-orm/piccolo/issues/1005
78
101
 
79
102
  """ # noqa: E501
80
103
  MyTable(value=[1, 1, 1]).save().run_sync()
81
104
 
105
+ # We have to explicitly specify the type, so CockroachDB works.
82
106
  self.assertEqual(
83
107
  MyTable.select(MyTable.value)
84
- .where(MyTable.value.all(1))
108
+ .where(MyTable.value.all(QueryString("{}::INTEGER", 1)))
85
109
  .first()
86
110
  .run_sync(),
87
111
  {"value": [1, 1, 1]},
88
112
  )
89
113
 
114
+ # We have to explicitly specify the type, so CockroachDB works.
90
115
  self.assertEqual(
91
116
  MyTable.select(MyTable.value)
92
- .where(MyTable.value.all(0))
117
+ .where(MyTable.value.all(QueryString("{}::INTEGER", 0)))
93
118
  .first()
94
119
  .run_sync(),
95
120
  None,
96
121
  )
97
122
 
98
- @engines_only("postgres")
123
+ @engines_skip("sqlite")
124
+ @pytest.mark.cockroach_array_slow
99
125
  def test_any(self):
100
126
  """
101
127
  Make sure rows can be retrieved where any items in an array match a
102
128
  given value.
103
129
 
104
- 🐛 Cockroach bug: https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
130
+ In CockroachDB <= v22.2.0 we had this error:
131
+
132
+ * https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
133
+
134
+ In newer CockroachDB versions, it runs but is very slow:
135
+
136
+ * https://github.com/piccolo-orm/piccolo/issues/1005
105
137
 
106
138
  """ # noqa: E501
139
+
107
140
  MyTable(value=[1, 2, 3]).save().run_sync()
108
141
 
142
+ # We have to explicitly specify the type, so CockroachDB works.
109
143
  self.assertEqual(
110
144
  MyTable.select(MyTable.value)
111
- .where(MyTable.value.any(1))
145
+ .where(MyTable.value.any(QueryString("{}::INTEGER", 1)))
112
146
  .first()
113
147
  .run_sync(),
114
148
  {"value": [1, 2, 3]},
115
149
  )
116
150
 
151
+ # We have to explicitly specify the type, so CockroachDB works.
117
152
  self.assertEqual(
118
153
  MyTable.select(MyTable.value)
119
- .where(MyTable.value.any(0))
154
+ .where(MyTable.value.any(QueryString("{}::INTEGER", 0)))
120
155
  .first()
121
156
  .run_sync(),
122
157
  None,
123
158
  )
124
159
 
125
- @engines_only("postgres")
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
+
188
+ @engines_skip("sqlite")
189
+ @pytest.mark.cockroach_array_slow
126
190
  def test_cat(self):
127
191
  """
128
192
  Make sure values can be appended to an array.
129
193
 
130
- 🐛 Cockroach bug: https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
194
+ In CockroachDB <= v22.2.0 we had this error:
195
+
196
+ * https://github.com/cockroachdb/cockroach/issues/71908 "could not decorrelate subquery" error under asyncpg
197
+
198
+ In newer CockroachDB versions, it runs but is very slow:
199
+
200
+ * https://github.com/piccolo-orm/piccolo/issues/1005
131
201
 
132
202
  """ # noqa: E501
133
203
  MyTable(value=[1, 1, 1]).save().run_sync()
@@ -137,7 +207,8 @@ class TestArray(TestCase):
137
207
  ).run_sync()
138
208
 
139
209
  self.assertEqual(
140
- MyTable.select().run_sync(), [{"id": 1, "value": [1, 1, 1, 2]}]
210
+ MyTable.select(MyTable.value).run_sync(),
211
+ [{"value": [1, 1, 1, 2]}],
141
212
  )
142
213
 
143
214
  # Try plus symbol
@@ -147,7 +218,8 @@ class TestArray(TestCase):
147
218
  ).run_sync()
148
219
 
149
220
  self.assertEqual(
150
- MyTable.select().run_sync(), [{"id": 1, "value": [1, 1, 1, 2, 3]}]
221
+ MyTable.select(MyTable.value).run_sync(),
222
+ [{"value": [1, 1, 1, 2, 3]}],
151
223
  )
152
224
 
153
225
  # Make sure non-list values work
@@ -157,8 +229,8 @@ class TestArray(TestCase):
157
229
  ).run_sync()
158
230
 
159
231
  self.assertEqual(
160
- MyTable.select().run_sync(),
161
- [{"id": 1, "value": [1, 1, 1, 2, 3, 4]}],
232
+ MyTable.select(MyTable.value).run_sync(),
233
+ [{"value": [1, 1, 1, 2, 3, 4]}],
162
234
  )
163
235
 
164
236
  @sqlite_only