mysqlengine 1.0.1__cp313-cp313-macosx_10_13_x86_64.whl → 1.0.3__cp313-cp313-macosx_10_13_x86_64.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.
Potentially problematic release.
This version of mysqlengine might be problematic. Click here for more details.
- mysqlengine/__init__.pxd +0 -0
- mysqlengine/column.c +1 -1
- mysqlengine/column.cpython-313-darwin.so +0 -0
- mysqlengine/column.pxd +149 -0
- mysqlengine/constraint.c +1 -1
- mysqlengine/constraint.cpython-313-darwin.so +0 -0
- mysqlengine/constraint.pxd +121 -0
- mysqlengine/database.c +1 -1
- mysqlengine/database.cpython-313-darwin.so +0 -0
- mysqlengine/database.pxd +58 -0
- mysqlengine/dml.c +148 -148
- mysqlengine/dml.cpython-313-darwin.so +0 -0
- mysqlengine/dml.pxd +387 -0
- mysqlengine/element.c +148 -148
- mysqlengine/element.cpython-313-darwin.so +0 -0
- mysqlengine/element.pxd +179 -0
- mysqlengine/index.c +1 -1
- mysqlengine/index.cpython-313-darwin.so +0 -0
- mysqlengine/index.pxd +71 -0
- mysqlengine/partition.c +1 -1
- mysqlengine/partition.cpython-313-darwin.so +0 -0
- mysqlengine/partition.pxd +128 -0
- mysqlengine/table.c +1 -1
- mysqlengine/table.cpython-313-darwin.so +0 -0
- mysqlengine/table.pxd +169 -0
- mysqlengine/utils.cpython-313-darwin.so +0 -0
- mysqlengine/utils.pxd +613 -0
- {mysqlengine-1.0.1.dist-info → mysqlengine-1.0.3.dist-info}/METADATA +3 -4
- mysqlengine-1.0.3.dist-info/RECORD +52 -0
- mysqlengine-1.0.1.dist-info/RECORD +0 -42
- {mysqlengine-1.0.1.dist-info → mysqlengine-1.0.3.dist-info}/WHEEL +0 -0
- {mysqlengine-1.0.1.dist-info → mysqlengine-1.0.3.dist-info}/licenses/LICENSE +0 -0
- {mysqlengine-1.0.1.dist-info → mysqlengine-1.0.3.dist-info}/top_level.txt +0 -0
mysqlengine/__init__.pxd
ADDED
|
File without changes
|
mysqlengine/column.c
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"-Wno-incompatible-pointer-types"
|
|
15
15
|
],
|
|
16
16
|
"include_dirs": [
|
|
17
|
-
"/private/var/folders/
|
|
17
|
+
"/private/var/folders/sw/lqy3v8g55m76fhwckg439jjm0000gn/T/pip-build-env-c1bawfqy/overlay/lib/python3.13/site-packages/numpy/_core/include"
|
|
18
18
|
],
|
|
19
19
|
"name": "mysqlengine.column",
|
|
20
20
|
"sources": [
|
|
Binary file
|
mysqlengine/column.pxd
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# cython: language_level=3
|
|
2
|
+
from sqlcycli.charset cimport Charset
|
|
3
|
+
from mysqlengine.element cimport Element, Elements, Logs, Metadata, Query
|
|
4
|
+
|
|
5
|
+
# Definition
|
|
6
|
+
cdef class Definition(Element):
|
|
7
|
+
cdef:
|
|
8
|
+
# . definition
|
|
9
|
+
str _data_type
|
|
10
|
+
object _python_type
|
|
11
|
+
bint _null
|
|
12
|
+
object _default
|
|
13
|
+
bint _primary_key
|
|
14
|
+
bint _unique_key
|
|
15
|
+
bint _indexed
|
|
16
|
+
str _comment
|
|
17
|
+
bint _visible
|
|
18
|
+
# . integer column
|
|
19
|
+
bint _unsigned
|
|
20
|
+
bint _auto_increment
|
|
21
|
+
# . floating/fixed point column
|
|
22
|
+
int _default_precision
|
|
23
|
+
int _precision
|
|
24
|
+
int _default_scale
|
|
25
|
+
int _scale
|
|
26
|
+
# . temporal column
|
|
27
|
+
int _default_fsp
|
|
28
|
+
int _fsp
|
|
29
|
+
bint _auto_init
|
|
30
|
+
bint _auto_update
|
|
31
|
+
# . string column
|
|
32
|
+
long long _default_length
|
|
33
|
+
long long _length
|
|
34
|
+
# . enum column
|
|
35
|
+
tuple _elements
|
|
36
|
+
# Generate SQL
|
|
37
|
+
cpdef str _gen_definition_sql(self)
|
|
38
|
+
cpdef str _gen_data_type_sql(self)
|
|
39
|
+
# Metadata
|
|
40
|
+
cpdef Logs _sync_from_metadata(self, ColumnMetadata meta, Logs logs=?)
|
|
41
|
+
cpdef int _diff_from_metadata(self, ColumnMetadata meta) except -1
|
|
42
|
+
cpdef long long _read_metadata_precision(self, object value) except -2
|
|
43
|
+
# Setter
|
|
44
|
+
cpdef bint setup(self, Column col) except -1
|
|
45
|
+
# Validate
|
|
46
|
+
cpdef object _validate_default(self, object default)
|
|
47
|
+
# Internal
|
|
48
|
+
cdef inline int _get_fsp(self) except -2
|
|
49
|
+
cdef inline long long _get_length(self) except -2
|
|
50
|
+
# Copy
|
|
51
|
+
cpdef Definition copy(self)
|
|
52
|
+
# Special method
|
|
53
|
+
cdef inline str _gen_repr(self, list reprs)
|
|
54
|
+
|
|
55
|
+
# Column
|
|
56
|
+
cdef class Column(Element):
|
|
57
|
+
cdef:
|
|
58
|
+
# Common
|
|
59
|
+
Definition _definition
|
|
60
|
+
bint _primary_key
|
|
61
|
+
bint _unique_key
|
|
62
|
+
bint _indexed
|
|
63
|
+
# Generated column
|
|
64
|
+
str _expression
|
|
65
|
+
int _virtual
|
|
66
|
+
# Sync
|
|
67
|
+
cpdef Logs Initialize(self, bint force=?)
|
|
68
|
+
cpdef Logs Add(self, int position=?)
|
|
69
|
+
cpdef bint Exists(self) except -1
|
|
70
|
+
cpdef Logs Drop(self)
|
|
71
|
+
cpdef Logs _Modify(self, object definition, object expression, int position)
|
|
72
|
+
cpdef Logs SetVisible(self, bint visible)
|
|
73
|
+
cpdef Logs SetDefault(self, object default)
|
|
74
|
+
cpdef ColumnMetadata ShowMetadata(self)
|
|
75
|
+
cpdef tuple ShowColumnNames(self)
|
|
76
|
+
cpdef Logs SyncFromRemote(self)
|
|
77
|
+
cpdef Logs SyncToRemote(self)
|
|
78
|
+
# Generate SQL
|
|
79
|
+
cpdef str _gen_definition_sql(self)
|
|
80
|
+
cpdef str _gen_add_sql(self, int position, tuple columns)
|
|
81
|
+
cpdef str _gen_exists_sql(self)
|
|
82
|
+
cpdef str _gen_drop_sql(self)
|
|
83
|
+
cpdef ColumnQuery _gen_modify_query(self, ColumnMetadata meta, Definition definition, object expression, int position, tuple columns)
|
|
84
|
+
cpdef str _gen_set_visible_sql(self, bint visible)
|
|
85
|
+
cpdef str _gen_set_default_sql(self, object default)
|
|
86
|
+
cpdef str _gen_show_metadata_sql(self)
|
|
87
|
+
cpdef str _gen_show_column_names_sql(self)
|
|
88
|
+
# Metadata
|
|
89
|
+
cpdef Logs _sync_from_metadata(self, ColumnMetadata meta, Logs logs=?)
|
|
90
|
+
cpdef int _diff_from_metadata(self, ColumnMetadata meta) except -1
|
|
91
|
+
# Setter
|
|
92
|
+
cpdef bint setup(self, str tb_name, str db_name, object charset, object collate, object pool) except -1
|
|
93
|
+
cpdef bint _set_definition(self, Definition definition) except -1
|
|
94
|
+
# Copy
|
|
95
|
+
cpdef Column copy(self)
|
|
96
|
+
cpdef Column _construct(self, Definition definition, object expression, object virtual)
|
|
97
|
+
|
|
98
|
+
cdef class GeneratedColumn(Column):
|
|
99
|
+
pass
|
|
100
|
+
|
|
101
|
+
# Columns
|
|
102
|
+
cdef class Columns(Elements):
|
|
103
|
+
# Setter
|
|
104
|
+
cpdef bint setup(self, str tb_name, str db_name, object charset, object collate, object pool) except -1
|
|
105
|
+
# Copy
|
|
106
|
+
cpdef Columns copy(self)
|
|
107
|
+
|
|
108
|
+
# Metadata
|
|
109
|
+
cdef class ColumnMetadata(Metadata):
|
|
110
|
+
cdef:
|
|
111
|
+
# Base data
|
|
112
|
+
str _db_name
|
|
113
|
+
str _tb_name
|
|
114
|
+
str _column_name
|
|
115
|
+
str _column_type
|
|
116
|
+
int _position
|
|
117
|
+
str _default
|
|
118
|
+
bint _null
|
|
119
|
+
str _data_type
|
|
120
|
+
object _character_maximum_length
|
|
121
|
+
object _numeric_precision
|
|
122
|
+
object _numeric_scale
|
|
123
|
+
object _datetime_precision
|
|
124
|
+
Charset _charset
|
|
125
|
+
str _extra
|
|
126
|
+
str _comment
|
|
127
|
+
str _expression
|
|
128
|
+
int _virtual
|
|
129
|
+
# Additional data
|
|
130
|
+
str _el_type
|
|
131
|
+
bint _visible
|
|
132
|
+
# . integer
|
|
133
|
+
bint _auto_increment
|
|
134
|
+
bint _unsigned
|
|
135
|
+
# . datetime
|
|
136
|
+
bint _auto_init
|
|
137
|
+
bint _auto_update
|
|
138
|
+
# . index
|
|
139
|
+
bint _primary_key
|
|
140
|
+
bint _unique_key
|
|
141
|
+
bint _indexed
|
|
142
|
+
str _column_index_name
|
|
143
|
+
int _column_index_seq
|
|
144
|
+
int _column_index_length
|
|
145
|
+
|
|
146
|
+
# Query
|
|
147
|
+
cdef class ColumnQuery(Query):
|
|
148
|
+
cdef:
|
|
149
|
+
Definition _definition
|
mysqlengine/constraint.c
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"-Wno-incompatible-pointer-types"
|
|
15
15
|
],
|
|
16
16
|
"include_dirs": [
|
|
17
|
-
"/private/var/folders/
|
|
17
|
+
"/private/var/folders/sw/lqy3v8g55m76fhwckg439jjm0000gn/T/pip-build-env-c1bawfqy/overlay/lib/python3.13/site-packages/numpy/_core/include"
|
|
18
18
|
],
|
|
19
19
|
"name": "mysqlengine.constraint",
|
|
20
20
|
"sources": [
|
|
Binary file
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# cython: language_level=3
|
|
2
|
+
from mysqlengine.element cimport Element, Elements, Logs, Metadata, Query
|
|
3
|
+
|
|
4
|
+
# Constraint
|
|
5
|
+
cdef class Constraint(Element):
|
|
6
|
+
cdef:
|
|
7
|
+
# Common
|
|
8
|
+
bint _enforced
|
|
9
|
+
# Primary/Unique Key
|
|
10
|
+
tuple _columns
|
|
11
|
+
str _index_type
|
|
12
|
+
str _comment
|
|
13
|
+
bint _visible
|
|
14
|
+
# Foreign Key
|
|
15
|
+
str _reference_table
|
|
16
|
+
tuple _reference_columns
|
|
17
|
+
str _on_delete
|
|
18
|
+
str _on_update
|
|
19
|
+
# Check
|
|
20
|
+
str _expression
|
|
21
|
+
# Sync
|
|
22
|
+
cpdef Logs Initialize(self, bint force=?)
|
|
23
|
+
cpdef Logs Add(self)
|
|
24
|
+
cpdef bint Exists(self) except -1
|
|
25
|
+
cpdef Logs Drop(self)
|
|
26
|
+
cpdef Logs _Alter(
|
|
27
|
+
self, object columns, object index_type, object comment, object visible,
|
|
28
|
+
object reference_table, object reference_columns, object on_delete, object on_update,
|
|
29
|
+
object expression, object enforced,
|
|
30
|
+
)
|
|
31
|
+
cpdef ConstraintMetadata ShowMetadata(self)
|
|
32
|
+
cpdef tuple ShowConstraintSymbols(self)
|
|
33
|
+
cpdef Logs SyncFromRemote(self)
|
|
34
|
+
cpdef Logs SyncToRemote(self)
|
|
35
|
+
# Generate SQL
|
|
36
|
+
cpdef str _gen_definition_sql(self)
|
|
37
|
+
cpdef str _gen_add_sql(self)
|
|
38
|
+
cpdef str _gen_exists_sql(self)
|
|
39
|
+
cpdef str _gen_drop_sql(self)
|
|
40
|
+
cpdef Query _gen_alter_query(
|
|
41
|
+
self, ConstraintMetadata meta,
|
|
42
|
+
object columns, object index_type, object comment, object visible,
|
|
43
|
+
object reference_table, object reference_columns, object on_delete, object on_update,
|
|
44
|
+
object expression, object enforced,
|
|
45
|
+
)
|
|
46
|
+
cpdef str _gen_show_metadata_sql(self)
|
|
47
|
+
cpdef str _gen_show_constraint_symbols_sql(self)
|
|
48
|
+
# Metadata
|
|
49
|
+
cpdef Logs _sync_from_metadata(self, ConstraintMetadata meta, Logs logs=?)
|
|
50
|
+
cpdef int _diff_from_metadata(self, ConstraintMetadata meta) except -1
|
|
51
|
+
# Setter
|
|
52
|
+
cpdef bint setup(self, str tb_name, str db_name, object charset, object collate, object pool) except -1
|
|
53
|
+
cpdef bint _set_symbol(self) except -1
|
|
54
|
+
# Copy
|
|
55
|
+
cpdef Constraint copy(self)
|
|
56
|
+
cpdef Constraint _construct(
|
|
57
|
+
self, object columns, object index_type, object comment, object visible,
|
|
58
|
+
object reference_table, object reference_columns, object on_delete, object on_update,
|
|
59
|
+
object expression, object enforced,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
cdef class UniqueKey(Constraint):
|
|
63
|
+
# Sync
|
|
64
|
+
cpdef Logs SetVisible(self, bint visible)
|
|
65
|
+
# Generate SQL
|
|
66
|
+
cpdef str _gen_set_visible_sql(self, bint visible)
|
|
67
|
+
|
|
68
|
+
cdef class PrimaryKey(UniqueKey):
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
cdef class ForeignKey(Constraint):
|
|
72
|
+
# Validator
|
|
73
|
+
cdef inline str _validate_foreign_key_action(self, object action)
|
|
74
|
+
|
|
75
|
+
cdef class Check(Constraint):
|
|
76
|
+
# Sync
|
|
77
|
+
cpdef Logs SetEnforced(self, bint enforced)
|
|
78
|
+
# Generate SQL
|
|
79
|
+
cpdef str _gen_set_enforced_sql(self, bint enforced)
|
|
80
|
+
|
|
81
|
+
# Constraints
|
|
82
|
+
cdef class Constraints(Elements):
|
|
83
|
+
# Setter
|
|
84
|
+
cpdef bint setup(self, str tb_name, str db_name, object charset, object collate, object pool) except -1
|
|
85
|
+
# Copy
|
|
86
|
+
cpdef Constraints copy(self)
|
|
87
|
+
|
|
88
|
+
# Metadata
|
|
89
|
+
cdef class ConstraintMetadata(Metadata):
|
|
90
|
+
cdef:
|
|
91
|
+
# Base data
|
|
92
|
+
str _db_name
|
|
93
|
+
str _tb_name
|
|
94
|
+
str _constraint_name
|
|
95
|
+
str _constraint_type
|
|
96
|
+
bint _enforced
|
|
97
|
+
# Additional data
|
|
98
|
+
str _el_type
|
|
99
|
+
# Primary/Unique Key
|
|
100
|
+
str _index_type
|
|
101
|
+
bint _unique
|
|
102
|
+
str _comment
|
|
103
|
+
bint _visible
|
|
104
|
+
tuple _columns
|
|
105
|
+
# Foreign Key
|
|
106
|
+
str _reference_table
|
|
107
|
+
str _unique_constraint
|
|
108
|
+
str _on_delete
|
|
109
|
+
str _on_update
|
|
110
|
+
tuple _reference_columns
|
|
111
|
+
# Check
|
|
112
|
+
str _expression
|
|
113
|
+
|
|
114
|
+
cdef class UniPriKeyMetadata(ConstraintMetadata):
|
|
115
|
+
pass
|
|
116
|
+
|
|
117
|
+
cdef class ForeignKeyMetadata(ConstraintMetadata):
|
|
118
|
+
pass
|
|
119
|
+
|
|
120
|
+
cdef class CheckMetadata(ConstraintMetadata):
|
|
121
|
+
pass
|
mysqlengine/database.c
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"-Wno-incompatible-pointer-types"
|
|
16
16
|
],
|
|
17
17
|
"include_dirs": [
|
|
18
|
-
"/private/var/folders/
|
|
18
|
+
"/private/var/folders/sw/lqy3v8g55m76fhwckg439jjm0000gn/T/pip-build-env-c1bawfqy/overlay/lib/python3.13/site-packages/numpy/_core/include"
|
|
19
19
|
],
|
|
20
20
|
"name": "mysqlengine.database",
|
|
21
21
|
"sources": [
|
|
Binary file
|
mysqlengine/database.pxd
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# cython: language_level=3
|
|
2
|
+
from sqlcycli.charset cimport Charset
|
|
3
|
+
from mysqlengine.table cimport Tables, TempTableManager
|
|
4
|
+
from mysqlengine.element cimport Element, Logs, Metadata, Query
|
|
5
|
+
from mysqlengine.dml cimport InsertDML, ReplaceDML, UpdateDML, DeleteDML
|
|
6
|
+
|
|
7
|
+
# Database
|
|
8
|
+
cdef class Database(Element):
|
|
9
|
+
cdef:
|
|
10
|
+
# . configs
|
|
11
|
+
int _encryption
|
|
12
|
+
bint _read_only
|
|
13
|
+
# . internal
|
|
14
|
+
Tables _tables
|
|
15
|
+
bint _setup_finished
|
|
16
|
+
# DML
|
|
17
|
+
cpdef InsertDML Insert(self, object table, object partition=?, bint ignore=?, object priority=?)
|
|
18
|
+
cpdef ReplaceDML Replace(self, object table, object partition=?, bint low_priority=?)
|
|
19
|
+
cpdef UpdateDML Update(self, object table, object partition=?, bint ignore=?, bint low_priority=?, object alias=?)
|
|
20
|
+
cpdef DeleteDML Delete(self, object table, object partition=?, bint ignore=?, bint low_priority=?, bint quick=?, object alias=?, object multi_tables=?)
|
|
21
|
+
cpdef TempTableManager CreateTempTable(self, object conn, object name, object temp_table)
|
|
22
|
+
# Sync
|
|
23
|
+
cpdef Logs Initialize(self, bint force=?)
|
|
24
|
+
cpdef Logs Create(self, bint if_not_exists=?)
|
|
25
|
+
cpdef bint Exists(self) except -1
|
|
26
|
+
cpdef Logs Drop(self, bint if_exists=?)
|
|
27
|
+
cpdef Logs Alter(self, object charset=?, object collate=?, object encryption=?, object read_only=?)
|
|
28
|
+
cpdef DatabaseMetadata ShowMetadata(self)
|
|
29
|
+
cpdef Logs SyncFromRemote(self, bint thorough=?)
|
|
30
|
+
cpdef Logs SyncToRemote(self)
|
|
31
|
+
# Generate SQL
|
|
32
|
+
cpdef str _gen_create_sql(self, bint if_not_exists)
|
|
33
|
+
cpdef str _gen_exists_sql(self)
|
|
34
|
+
cpdef str _gen_drop_sql(self, bint if_exists)
|
|
35
|
+
cpdef Query _gen_alter_query(self, DatabaseMetadata meta, object charset, object collate, object encryption, object read_only)
|
|
36
|
+
cpdef str _gen_show_metadata_sql(self)
|
|
37
|
+
cpdef str _gen_lock_sql(self, tuple tables, bint lock_for_read)
|
|
38
|
+
# Metadata
|
|
39
|
+
cpdef Logs _sync_from_metadata(self, DatabaseMetadata meta, Logs logs=?)
|
|
40
|
+
# Setter
|
|
41
|
+
cpdef bint setup(self) except -1
|
|
42
|
+
# Assure Ready
|
|
43
|
+
cdef inline bint _assure_setup_ready(self) except -1
|
|
44
|
+
# Validate
|
|
45
|
+
cdef inline int _validate_read_only(self, object read_only) except -2
|
|
46
|
+
# Copy
|
|
47
|
+
cpdef Database copy(self)
|
|
48
|
+
|
|
49
|
+
# Metadata
|
|
50
|
+
cdef class DatabaseMetadata(Metadata):
|
|
51
|
+
cdef:
|
|
52
|
+
# Base data
|
|
53
|
+
str _db_name
|
|
54
|
+
Charset _charset
|
|
55
|
+
bint _encryption
|
|
56
|
+
str _options
|
|
57
|
+
# Additional data
|
|
58
|
+
bint _read_only
|