iceaxe 0.7.2__tar.gz → 0.8.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.

Potentially problematic release.


This version of iceaxe might be problematic. Click here for more details.

Files changed (81) hide show
  1. {iceaxe-0.7.2/iceaxe.egg-info → iceaxe-0.8.0}/PKG-INFO +1 -1
  2. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/schemas/test_actions.py +1 -0
  3. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/schemas/test_db_memory_serializer.py +46 -0
  4. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/base.py +1 -0
  5. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/field.py +13 -0
  6. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/schemas/db_memory_serializer.py +6 -0
  7. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/schemas/db_stubs.py +4 -0
  8. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/session_optimized.c +38 -23
  9. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/sql_types.py +1 -0
  10. {iceaxe-0.7.2 → iceaxe-0.8.0/iceaxe.egg-info}/PKG-INFO +1 -1
  11. {iceaxe-0.7.2 → iceaxe-0.8.0}/pyproject.toml +1 -1
  12. {iceaxe-0.7.2 → iceaxe-0.8.0}/LICENSE +0 -0
  13. {iceaxe-0.7.2 → iceaxe-0.8.0}/MANIFEST.in +0 -0
  14. {iceaxe-0.7.2 → iceaxe-0.8.0}/README.md +0 -0
  15. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__init__.py +0 -0
  16. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/__init__.py +0 -0
  17. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/benchmarks/__init__.py +0 -0
  18. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/benchmarks/test_bulk_insert.py +0 -0
  19. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/benchmarks/test_select.py +0 -0
  20. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/conf_models.py +0 -0
  21. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/conftest.py +0 -0
  22. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/docker_helpers.py +0 -0
  23. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/helpers.py +0 -0
  24. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/migrations/__init__.py +0 -0
  25. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/migrations/conftest.py +0 -0
  26. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/migrations/test_action_sorter.py +0 -0
  27. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/migrations/test_generator.py +0 -0
  28. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/migrations/test_generics.py +0 -0
  29. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/mountaineer/__init__.py +0 -0
  30. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/mountaineer/dependencies/__init__.py +0 -0
  31. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/mountaineer/dependencies/test_core.py +0 -0
  32. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/schemas/__init__.py +0 -0
  33. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/schemas/test_cli.py +0 -0
  34. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/schemas/test_db_serializer.py +0 -0
  35. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/schemas/test_db_stubs.py +0 -0
  36. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_alias.py +0 -0
  37. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_base.py +0 -0
  38. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_comparison.py +0 -0
  39. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_field.py +0 -0
  40. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_helpers.py +0 -0
  41. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_modifications.py +0 -0
  42. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_queries.py +0 -0
  43. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_queries_str.py +0 -0
  44. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_session.py +0 -0
  45. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/__tests__/test_text_search.py +0 -0
  46. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/alias_values.py +0 -0
  47. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/comparison.py +0 -0
  48. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/functions.py +0 -0
  49. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/generics.py +0 -0
  50. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/io.py +0 -0
  51. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/logging.py +0 -0
  52. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/migrations/__init__.py +0 -0
  53. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/migrations/action_sorter.py +0 -0
  54. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/migrations/cli.py +0 -0
  55. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/migrations/client_io.py +0 -0
  56. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/migrations/generator.py +0 -0
  57. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/migrations/migration.py +0 -0
  58. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/migrations/migrator.py +0 -0
  59. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/modifications.py +0 -0
  60. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/mountaineer/__init__.py +0 -0
  61. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/mountaineer/cli.py +0 -0
  62. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/mountaineer/config.py +0 -0
  63. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/mountaineer/dependencies/__init__.py +0 -0
  64. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/mountaineer/dependencies/core.py +0 -0
  65. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/postgres.py +0 -0
  66. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/py.typed +0 -0
  67. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/queries.py +0 -0
  68. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/queries_str.py +0 -0
  69. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/schemas/__init__.py +0 -0
  70. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/schemas/actions.py +0 -0
  71. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/schemas/cli.py +0 -0
  72. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/schemas/db_serializer.py +0 -0
  73. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/session.py +0 -0
  74. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/session_optimized.pyx +0 -0
  75. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe/typing.py +0 -0
  76. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe.egg-info/SOURCES.txt +0 -0
  77. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe.egg-info/dependency_links.txt +0 -0
  78. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe.egg-info/requires.txt +0 -0
  79. {iceaxe-0.7.2 → iceaxe-0.8.0}/iceaxe.egg-info/top_level.txt +0 -0
  80. {iceaxe-0.7.2 → iceaxe-0.8.0}/setup.cfg +0 -0
  81. {iceaxe-0.7.2 → iceaxe-0.8.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iceaxe
3
- Version: 0.7.2
3
+ Version: 0.8.0
4
4
  Summary: A modern, fast ORM for Python.
5
5
  Author-email: Pierce Freeman <pierce@freeman.vc>
6
6
  Requires-Python: >=3.11
@@ -262,6 +262,7 @@ async def test_add_column_any_type(
262
262
  (ColumnType.DECIMAL, ColumnType.NUMERIC),
263
263
  (ColumnType.SERIAL, ColumnType.INTEGER),
264
264
  (ColumnType.BIGSERIAL, ColumnType.BIGINT),
265
+ (ColumnType.SMALLSERIAL, ColumnType.SMALLINT),
265
266
  (ColumnType.CHAR, "character"),
266
267
  (ColumnType.TIME_WITHOUT_TIME_ZONE, "time without time zone"),
267
268
  (ColumnType.TIMESTAMP_WITHOUT_TIME_ZONE, "timestamp without time zone"),
@@ -1523,3 +1523,49 @@ def test_multiple_primary_keys_warning():
1523
1523
  assert "multiple fields marked as primary_key=True" in warning_message
1524
1524
  assert "composite primary key constraint" in warning_message
1525
1525
  assert "Consider using only one primary key field" in warning_message
1526
+
1527
+
1528
+ def test_explicit_type_override(clear_all_database_objects):
1529
+ """
1530
+ Test that explicit_type parameter overrides automatic type inference.
1531
+ """
1532
+
1533
+ class TestModel(TableBase):
1534
+ id: int = Field(primary_key=True)
1535
+ # This should be BIGINT instead of INTEGER due to explicit_type
1536
+ big_number: int = Field(explicit_type=ColumnType.BIGINT)
1537
+ # This should be TEXT instead of VARCHAR due to explicit_type
1538
+ long_text: str = Field(explicit_type=ColumnType.TEXT)
1539
+ # This should be JSONB instead of JSON due to explicit_type
1540
+ data: dict = Field(is_json=True, explicit_type=ColumnType.JSONB)
1541
+ # Normal field without explicit_type for comparison
1542
+ normal_field: str = Field()
1543
+
1544
+ migrator = DatabaseMemorySerializer()
1545
+ db_objects = list(migrator.delegate([TestModel]))
1546
+
1547
+ # Extract column definitions
1548
+ columns = [obj for obj, _ in db_objects if isinstance(obj, DBColumn)]
1549
+
1550
+ # Find each column and verify the type
1551
+ big_number_column = next(c for c in columns if c.column_name == "big_number")
1552
+ assert big_number_column.column_type == ColumnType.BIGINT
1553
+ assert not big_number_column.nullable
1554
+
1555
+ long_text_column = next(c for c in columns if c.column_name == "long_text")
1556
+ assert long_text_column.column_type == ColumnType.TEXT
1557
+ assert not long_text_column.nullable
1558
+
1559
+ data_column = next(c for c in columns if c.column_name == "data")
1560
+ assert data_column.column_type == ColumnType.JSONB
1561
+ assert not data_column.nullable
1562
+
1563
+ # Verify normal field still uses automatic inference
1564
+ normal_field_column = next(c for c in columns if c.column_name == "normal_field")
1565
+ assert normal_field_column.column_type == ColumnType.VARCHAR
1566
+ assert not normal_field_column.nullable
1567
+
1568
+ # Verify the id field uses automatic inference (INTEGER)
1569
+ id_column = next(c for c in columns if c.column_name == "id")
1570
+ assert id_column.column_type == ColumnType.INTEGER
1571
+ assert not id_column.nullable
@@ -76,6 +76,7 @@ class DBModelMetaclass(_model_construction.ModelMetaclass):
76
76
  index=False,
77
77
  check_expression=None,
78
78
  is_json=False,
79
+ explicit_type=None,
79
80
  )
80
81
  for field, info in cls.model_fields.items()
81
82
  }
@@ -19,6 +19,7 @@ from pydantic_core import PydanticUndefined
19
19
  from iceaxe.comparison import ComparisonBase
20
20
  from iceaxe.postgres import PostgresFieldBase
21
21
  from iceaxe.queries_str import QueryIdentifier, QueryLiteral
22
+ from iceaxe.sql_types import ColumnType
22
23
 
23
24
  if TYPE_CHECKING:
24
25
  from iceaxe.base import TableBase
@@ -37,6 +38,7 @@ class DBFieldInputs(_FieldInfoInputs, total=False):
37
38
  index: bool
38
39
  check_expression: str | None
39
40
  is_json: bool
41
+ explicit_type: ColumnType | None
40
42
 
41
43
 
42
44
  class DBFieldInfo(FieldInfo):
@@ -97,6 +99,12 @@ class DBFieldInfo(FieldInfo):
97
99
  When True, the field's value will be JSON serialized before storage.
98
100
  """
99
101
 
102
+ explicit_type: ColumnType | None = None
103
+ """
104
+ Explicitly specify the SQL column type for this field.
105
+ When set, this type takes precedence over automatic type inference.
106
+ """
107
+
100
108
  def __init__(self, **kwargs: Unpack[DBFieldInputs]):
101
109
  """
102
110
  Initialize a new DBFieldInfo instance with the given field configuration.
@@ -119,6 +127,7 @@ class DBFieldInfo(FieldInfo):
119
127
  self.index = kwargs.pop("index", False)
120
128
  self.check_expression = kwargs.pop("check_expression", None)
121
129
  self.is_json = kwargs.pop("is_json", False)
130
+ self.explicit_type = kwargs.pop("explicit_type", None)
122
131
 
123
132
  @classmethod
124
133
  def extend_field(
@@ -131,6 +140,7 @@ class DBFieldInfo(FieldInfo):
131
140
  index: bool,
132
141
  check_expression: str | None,
133
142
  is_json: bool,
143
+ explicit_type: ColumnType | None,
134
144
  ):
135
145
  """
136
146
  Helper function to extend a Pydantic FieldInfo with database-specific attributes.
@@ -144,6 +154,7 @@ class DBFieldInfo(FieldInfo):
144
154
  index=index,
145
155
  check_expression=check_expression,
146
156
  is_json=is_json,
157
+ explicit_type=explicit_type,
147
158
  **field._attributes_set, # type: ignore
148
159
  )
149
160
 
@@ -168,6 +179,7 @@ def __get_db_field(_: Callable[Concatenate[Any, P], Any] = PydanticField): # ty
168
179
  index: bool = False,
169
180
  check_expression: str | None = None,
170
181
  is_json: bool = False,
182
+ explicit_type: ColumnType | None = None,
171
183
  default: Any = _Unset,
172
184
  default_factory: (
173
185
  Callable[[], Any] | Callable[[dict[str, Any]], Any] | None
@@ -192,6 +204,7 @@ def __get_db_field(_: Callable[Concatenate[Any, P], Any] = PydanticField): # ty
192
204
  index=index,
193
205
  check_expression=check_expression,
194
206
  is_json=is_json,
207
+ explicit_type=explicit_type,
195
208
  ),
196
209
  )
197
210
 
@@ -415,6 +415,12 @@ class DatabaseHandler:
415
415
  if info.annotation is None:
416
416
  raise ValueError(f"Annotation must be provided for {table.__name__}.{key}")
417
417
 
418
+ # If explicit_type is provided, use it directly as the preferred type
419
+ if info.explicit_type is not None:
420
+ return TypeDeclarationResponse(
421
+ primitive_type=info.explicit_type,
422
+ )
423
+
418
424
  annotation = remove_null_type(info.annotation)
419
425
 
420
426
  # Resolve the type of the column, if generic
@@ -253,6 +253,10 @@ class DBColumn(DBColumnBase, DBObject["DBColumn"]):
253
253
  if isinstance(self.column_type, ColumnType):
254
254
  if self.column_type == ColumnType.INTEGER and self.autoincrement:
255
255
  explicit_data_type = ColumnType.SERIAL
256
+ elif self.column_type == ColumnType.BIGINT and self.autoincrement:
257
+ explicit_data_type = ColumnType.BIGSERIAL
258
+ elif self.column_type == ColumnType.SMALLINT and self.autoincrement:
259
+ explicit_data_type = ColumnType.SMALLSERIAL
256
260
  else:
257
261
  explicit_data_type = self.column_type
258
262
 
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.1.2 */
1
+ /* Generated by Cython 3.1.3 */
2
2
 
3
3
  /* BEGIN: Cython Metadata
4
4
  {
@@ -27,8 +27,8 @@ END: Cython Metadata */
27
27
  #elif PY_VERSION_HEX < 0x03080000
28
28
  #error Cython requires Python 3.8+.
29
29
  #else
30
- #define __PYX_ABI_VERSION "3_1_2"
31
- #define CYTHON_HEX_VERSION 0x030102F0
30
+ #define __PYX_ABI_VERSION "3_1_3"
31
+ #define CYTHON_HEX_VERSION 0x030103F0
32
32
  #define CYTHON_FUTURE_DIVISION 1
33
33
  /* CModulePreamble */
34
34
  #include <stddef.h>
@@ -391,6 +391,9 @@ END: Cython Metadata */
391
391
  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
392
392
  #endif
393
393
  #endif
394
+ #ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME
395
+ #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100
396
+ #endif
394
397
  #ifndef __has_attribute
395
398
  #define __has_attribute(x) 0
396
399
  #endif
@@ -2084,22 +2087,22 @@ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
2084
2087
  static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2085
2088
 
2086
2089
  /* TypeImport.proto */
2087
- #ifndef __PYX_HAVE_RT_ImportType_proto_3_1_2
2088
- #define __PYX_HAVE_RT_ImportType_proto_3_1_2
2090
+ #ifndef __PYX_HAVE_RT_ImportType_proto_3_1_3
2091
+ #define __PYX_HAVE_RT_ImportType_proto_3_1_3
2089
2092
  #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
2090
2093
  #include <stdalign.h>
2091
2094
  #endif
2092
2095
  #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
2093
- #define __PYX_GET_STRUCT_ALIGNMENT_3_1_2(s) alignof(s)
2096
+ #define __PYX_GET_STRUCT_ALIGNMENT_3_1_3(s) alignof(s)
2094
2097
  #else
2095
- #define __PYX_GET_STRUCT_ALIGNMENT_3_1_2(s) sizeof(void*)
2098
+ #define __PYX_GET_STRUCT_ALIGNMENT_3_1_3(s) sizeof(void*)
2096
2099
  #endif
2097
- enum __Pyx_ImportType_CheckSize_3_1_2 {
2098
- __Pyx_ImportType_CheckSize_Error_3_1_2 = 0,
2099
- __Pyx_ImportType_CheckSize_Warn_3_1_2 = 1,
2100
- __Pyx_ImportType_CheckSize_Ignore_3_1_2 = 2
2100
+ enum __Pyx_ImportType_CheckSize_3_1_3 {
2101
+ __Pyx_ImportType_CheckSize_Error_3_1_3 = 0,
2102
+ __Pyx_ImportType_CheckSize_Warn_3_1_3 = 1,
2103
+ __Pyx_ImportType_CheckSize_Ignore_3_1_3 = 2
2101
2104
  };
2102
- static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_2 check_size);
2105
+ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_3 check_size);
2103
2106
  #endif
2104
2107
 
2105
2108
  /* ListPack.proto */
@@ -5448,15 +5451,15 @@ static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
5448
5451
  /*--- Type import code ---*/
5449
5452
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
5450
5453
  __Pyx_GOTREF(__pyx_t_1);
5451
- __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_2(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
5454
+ __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_3(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
5452
5455
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
5453
- sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyTypeObject),
5456
+ sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_3(PyTypeObject),
5454
5457
  #elif CYTHON_COMPILING_IN_LIMITED_API
5455
5458
  0, 0,
5456
5459
  #else
5457
- sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyHeapTypeObject),
5460
+ sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_3(PyHeapTypeObject),
5458
5461
  #endif
5459
- __Pyx_ImportType_CheckSize_Warn_3_1_2); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(1, 9, __pyx_L1_error)
5462
+ __Pyx_ImportType_CheckSize_Warn_3_1_3); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(1, 9, __pyx_L1_error)
5460
5463
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5461
5464
  __Pyx_RefNannyFinishContext();
5462
5465
  return 0;
@@ -6881,6 +6884,13 @@ try_unpack:
6881
6884
 
6882
6885
  /* PyObjectCallMethod0 */
6883
6886
  static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
6887
+ #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
6888
+ PyObject *args[1] = {obj};
6889
+ (void) __Pyx_PyObject_GetMethod;
6890
+ (void) __Pyx_PyObject_CallOneArg;
6891
+ (void) __Pyx_PyObject_CallNoArg;
6892
+ return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
6893
+ #else
6884
6894
  PyObject *method = NULL, *result = NULL;
6885
6895
  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
6886
6896
  if (likely(is_method)) {
@@ -6893,6 +6903,7 @@ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name
6893
6903
  Py_DECREF(method);
6894
6904
  bad:
6895
6905
  return result;
6906
+ #endif
6896
6907
  }
6897
6908
 
6898
6909
  /* RaiseNoneIterError */
@@ -8558,10 +8569,10 @@ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *nam
8558
8569
  }
8559
8570
 
8560
8571
  /* TypeImport */
8561
- #ifndef __PYX_HAVE_RT_ImportType_3_1_2
8562
- #define __PYX_HAVE_RT_ImportType_3_1_2
8563
- static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module_name, const char *class_name,
8564
- size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_2 check_size)
8572
+ #ifndef __PYX_HAVE_RT_ImportType_3_1_3
8573
+ #define __PYX_HAVE_RT_ImportType_3_1_3
8574
+ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module_name, const char *class_name,
8575
+ size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_3 check_size)
8565
8576
  {
8566
8577
  PyObject *result = 0;
8567
8578
  Py_ssize_t basicsize;
@@ -8617,7 +8628,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module
8617
8628
  module_name, class_name, size, basicsize+itemsize);
8618
8629
  goto bad;
8619
8630
  }
8620
- if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_2 &&
8631
+ if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_3 &&
8621
8632
  ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
8622
8633
  PyErr_Format(PyExc_ValueError,
8623
8634
  "%.200s.%.200s size changed, may indicate binary incompatibility. "
@@ -8625,7 +8636,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module
8625
8636
  module_name, class_name, size, basicsize, basicsize+itemsize);
8626
8637
  goto bad;
8627
8638
  }
8628
- else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_2 && (size_t)basicsize > size) {
8639
+ else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_3 && (size_t)basicsize > size) {
8629
8640
  if (PyErr_WarnFormat(NULL, 0,
8630
8641
  "%.200s.%.200s size changed, may indicate binary incompatibility. "
8631
8642
  "Expected %zd from C header, got %zd from PyObject",
@@ -8830,6 +8841,7 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
8830
8841
  changed = 1;
8831
8842
  }
8832
8843
  #endif // CYTHON_METH_FASTCALL
8844
+ #if !CYTHON_COMPILING_IN_PYPY
8833
8845
  else if (strcmp(memb->name, "__module__") == 0) {
8834
8846
  PyObject *descr;
8835
8847
  assert(memb->type == T_OBJECT);
@@ -8844,11 +8856,13 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
8844
8856
  }
8845
8857
  changed = 1;
8846
8858
  }
8859
+ #endif // !CYTHON_COMPILING_IN_PYPY
8847
8860
  }
8848
8861
  memb++;
8849
8862
  }
8850
8863
  }
8851
8864
  #endif // !CYTHON_COMPILING_IN_LIMITED_API
8865
+ #if !CYTHON_COMPILING_IN_PYPY
8852
8866
  slot = spec->slots;
8853
8867
  while (slot && slot->slot && slot->slot != Py_tp_getset)
8854
8868
  slot++;
@@ -8880,6 +8894,7 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
8880
8894
  ++getset;
8881
8895
  }
8882
8896
  }
8897
+ #endif // !CYTHON_COMPILING_IN_PYPY
8883
8898
  if (changed)
8884
8899
  PyType_Modified(type);
8885
8900
  #endif // PY_VERSION_HEX > 0x030900B1
@@ -9012,7 +9027,7 @@ bad:
9012
9027
  }
9013
9028
 
9014
9029
  /* CommonTypesMetaclass */
9015
- PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
9030
+ static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
9016
9031
  return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
9017
9032
  }
9018
9033
  static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
@@ -23,6 +23,7 @@ class ColumnType(StrEnum):
23
23
  DOUBLE_PRECISION = "double precision"
24
24
  SERIAL = "serial"
25
25
  BIGSERIAL = "bigserial"
26
+ SMALLSERIAL = "smallserial"
26
27
 
27
28
  # Monetary Type
28
29
  MONEY = "money"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iceaxe
3
- Version: 0.7.2
3
+ Version: 0.8.0
4
4
  Summary: A modern, fast ORM for Python.
5
5
  Author-email: Pierce Freeman <pierce@freeman.vc>
6
6
  Requires-Python: >=3.11
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "iceaxe"
3
- version = "0.7.2"
3
+ version = "0.8.0"
4
4
  description = "A modern, fast ORM for Python."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes