mysqlengine 1.0.0__cp311-cp311-win_amd64.whl → 1.0.3__cp311-cp311-win_amd64.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/database.c CHANGED
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "depends": [],
13
13
  "include_dirs": [
14
- "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-build-env-vrhrqtoa\\overlay\\Lib\\site-packages\\numpy\\_core\\include"
14
+ "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-build-env-anb099wn\\overlay\\Lib\\site-packages\\numpy\\_core\\include"
15
15
  ],
16
16
  "name": "mysqlengine.database",
17
17
  "sources": [
@@ -1614,6 +1614,7 @@ struct __pyx_obj_8sqlcycli_10connection_SSDfCursor;
1614
1614
  struct __pyx_obj_8sqlcycli_10connection_CursorManager;
1615
1615
  struct __pyx_obj_8sqlcycli_10connection_TransactionManager;
1616
1616
  struct __pyx_obj_8sqlcycli_10connection_BaseConnection;
1617
+ struct __pyx_obj_8sqlcycli_10connection_Connection;
1617
1618
  struct __pyx_obj_8sqlcycli_3aio_10connection_MysqlResult;
1618
1619
  struct __pyx_obj_8sqlcycli_3aio_10connection_Cursor;
1619
1620
  struct __pyx_obj_8sqlcycli_3aio_10connection_DictCursor;
@@ -1624,6 +1625,7 @@ struct __pyx_obj_8sqlcycli_3aio_10connection_SSDfCursor;
1624
1625
  struct __pyx_obj_8sqlcycli_3aio_10connection_CursorManager;
1625
1626
  struct __pyx_obj_8sqlcycli_3aio_10connection_TransactionManager;
1626
1627
  struct __pyx_obj_8sqlcycli_3aio_10connection_BaseConnection;
1628
+ struct __pyx_obj_8sqlcycli_3aio_10connection_Connection;
1627
1629
  struct __pyx_obj_8sqlcycli_3aio_4pool_PoolConnection;
1628
1630
  struct __pyx_obj_8sqlcycli_3aio_4pool_PoolSyncConnection;
1629
1631
  struct __pyx_obj_8sqlcycli_3aio_4pool_PoolConnectionManager;
@@ -2311,7 +2313,7 @@ struct __pyx_opt_args_8sqlcycli_10connection_6Cursor_scroll {
2311
2313
  PyObject *mode;
2312
2314
  };
2313
2315
 
2314
- /* "connection.pxd":193
2316
+ /* "connection.pxd":194
2315
2317
  * cdef inline bint _setup_internal(self) except -1
2316
2318
  * # Cursor
2317
2319
  * cpdef Cursor cursor(self, object cursor=?) # <<<<<<<<<<<<<<
@@ -2323,7 +2325,7 @@ struct __pyx_opt_args_8sqlcycli_10connection_14BaseConnection_cursor {
2323
2325
  PyObject *cursor;
2324
2326
  };
2325
2327
 
2326
- /* "connection.pxd":194
2328
+ /* "connection.pxd":195
2327
2329
  * # Cursor
2328
2330
  * cpdef Cursor cursor(self, object cursor=?)
2329
2331
  * cpdef TransactionManager transaction(self, object cursor=?) # <<<<<<<<<<<<<<
@@ -2335,7 +2337,7 @@ struct __pyx_opt_args_8sqlcycli_10connection_14BaseConnection_transaction {
2335
2337
  PyObject *cursor;
2336
2338
  };
2337
2339
 
2338
- /* "connection.pxd":197
2340
+ /* "connection.pxd":198
2339
2341
  * cdef inline type _validate_cursor(self, object cursor)
2340
2342
  * # Query
2341
2343
  * cpdef unsigned long long query(self, str sql, bint unbuffered=?) # <<<<<<<<<<<<<<
@@ -2347,7 +2349,7 @@ struct __pyx_opt_args_8sqlcycli_10connection_14BaseConnection_query {
2347
2349
  int unbuffered;
2348
2350
  };
2349
2351
 
2350
- /* "connection.pxd":207
2352
+ /* "connection.pxd":208
2351
2353
  * cpdef tuple show_warnings(self)
2352
2354
  * cpdef bint select_database(self, str db) except -1
2353
2355
  * cpdef object escape_args(self, object args, bint many=?, bint itemize=?) # <<<<<<<<<<<<<<
@@ -2360,7 +2362,7 @@ struct __pyx_opt_args_8sqlcycli_10connection_14BaseConnection_escape_args {
2360
2362
  int itemize;
2361
2363
  };
2362
2364
 
2363
- /* "connection.pxd":210
2365
+ /* "connection.pxd":211
2364
2366
  * cpdef bytes encode_sql(self, str sql)
2365
2367
  * # . client
2366
2368
  * cpdef bint set_charset(self, str charset, object collation=?) except -1 # <<<<<<<<<<<<<<
@@ -2372,7 +2374,7 @@ struct __pyx_opt_args_8sqlcycli_10connection_14BaseConnection_set_charset {
2372
2374
  PyObject *collation;
2373
2375
  };
2374
2376
 
2375
- /* "connection.pxd":247
2377
+ /* "connection.pxd":248
2376
2378
  * cpdef bint closed(self) except -1
2377
2379
  * cpdef bint kill(self, int thread_id) except -1
2378
2380
  * cpdef bint ping(self, bint reconnect=?) except -1 # <<<<<<<<<<<<<<
@@ -2384,7 +2386,7 @@ struct __pyx_opt_args_8sqlcycli_10connection_14BaseConnection_ping {
2384
2386
  int reconnect;
2385
2387
  };
2386
2388
 
2387
- /* "connection.pxd":261
2389
+ /* "connection.pxd":262
2388
2390
  * cdef inline bint _set_use_time(self) except -1
2389
2391
  * # Read
2390
2392
  * cpdef unsigned long long next_result(self, bint unbuffered=?) # <<<<<<<<<<<<<<
@@ -2414,7 +2416,7 @@ struct __pyx_opt_args_8sqlcycli_3aio_10connection_6Cursor_mogrify {
2414
2416
  int itemize;
2415
2417
  };
2416
2418
 
2417
- /* "connection.pxd":170
2419
+ /* "connection.pxd":171
2418
2420
  * cdef inline bint _setup_internal(self) except -1
2419
2421
  * # Cursor
2420
2422
  * cpdef CursorManager cursor(self, object cursor=?) # <<<<<<<<<<<<<<
@@ -2426,7 +2428,7 @@ struct __pyx_opt_args_8sqlcycli_3aio_10connection_14BaseConnection_cursor {
2426
2428
  PyObject *cursor;
2427
2429
  };
2428
2430
 
2429
- /* "connection.pxd":171
2431
+ /* "connection.pxd":172
2430
2432
  * # Cursor
2431
2433
  * cpdef CursorManager cursor(self, object cursor=?)
2432
2434
  * cpdef TransactionManager transaction(self, object cursor=?) # <<<<<<<<<<<<<<
@@ -2438,7 +2440,7 @@ struct __pyx_opt_args_8sqlcycli_3aio_10connection_14BaseConnection_transaction {
2438
2440
  PyObject *cursor;
2439
2441
  };
2440
2442
 
2441
- /* "connection.pxd":174
2443
+ /* "connection.pxd":175
2442
2444
  * cdef inline type _validate_cursor(self, object cursor)
2443
2445
  * # Query
2444
2446
  * cpdef object escape_args(self, object args, bint many=?, bint itemize=?) # <<<<<<<<<<<<<<
@@ -4552,10 +4554,11 @@ struct __pyx_obj_8sqlcycli_7charset_Charset {
4552
4554
  PyObject *_encoding;
4553
4555
  char *_encoding_c;
4554
4556
  int _is_default;
4557
+ Py_ssize_t _hashcode;
4555
4558
  };
4556
4559
 
4557
4560
 
4558
- /* "sqlcycli/charset.pxd":15
4561
+ /* "sqlcycli/charset.pxd":16
4559
4562
  * cpdef bint is_binary(self)
4560
4563
  *
4561
4564
  * cdef class Charsets: # <<<<<<<<<<<<<<
@@ -4590,11 +4593,12 @@ struct __pyx_obj_7cytimes_4pydt__Pydt {
4590
4593
  * # Auth Plugin
4591
4594
  * cdef class AuthPlugin: # <<<<<<<<<<<<<<
4592
4595
  * cdef:
4593
- * object _mysql_native_password
4596
+ * # . plugins registry
4594
4597
  */
4595
4598
  struct __pyx_obj_8sqlcycli_5_auth_AuthPlugin {
4596
4599
  PyObject_HEAD
4597
4600
  struct __pyx_vtabstruct_8sqlcycli_5_auth_AuthPlugin *__pyx_vtab;
4601
+ PyObject *_plugins;
4598
4602
  PyObject *_mysql_native_password;
4599
4603
  PyObject *_caching_sha2_password;
4600
4604
  PyObject *_sha256_password;
@@ -4602,7 +4606,6 @@ struct __pyx_obj_8sqlcycli_5_auth_AuthPlugin {
4602
4606
  PyObject *_mysql_old_password;
4603
4607
  PyObject *_mysql_clear_password;
4604
4608
  PyObject *_dialog;
4605
- PyObject *_plugins;
4606
4609
  };
4607
4610
 
4608
4611
 
@@ -4771,7 +4774,7 @@ struct __pyx_obj_8sqlcycli_10connection_SSDfCursor {
4771
4774
 
4772
4775
  /* "connection.pxd":104
4773
4776
  *
4774
- * # Connection
4777
+ * # Cursor Manager
4775
4778
  * cdef class CursorManager: # <<<<<<<<<<<<<<
4776
4779
  * cdef:
4777
4780
  * BaseConnection _conn
@@ -4798,9 +4801,9 @@ struct __pyx_obj_8sqlcycli_10connection_TransactionManager {
4798
4801
  };
4799
4802
 
4800
4803
 
4801
- /* "connection.pxd":116
4802
- * pass
4804
+ /* "connection.pxd":117
4803
4805
  *
4806
+ * # Connection
4804
4807
  * cdef class BaseConnection: # <<<<<<<<<<<<<<
4805
4808
  * cdef:
4806
4809
  * # Basic
@@ -4868,6 +4871,17 @@ struct __pyx_obj_8sqlcycli_10connection_BaseConnection {
4868
4871
  };
4869
4872
 
4870
4873
 
4874
+ /* "connection.pxd":270
4875
+ * cdef inline bytes _read_bytes(self, unsigned int size)
4876
+ *
4877
+ * cdef class Connection(BaseConnection): # <<<<<<<<<<<<<<
4878
+ * pass
4879
+ */
4880
+ struct __pyx_obj_8sqlcycli_10connection_Connection {
4881
+ struct __pyx_obj_8sqlcycli_10connection_BaseConnection __pyx_base;
4882
+ };
4883
+
4884
+
4871
4885
  /* "connection.pxd":7
4872
4886
  *
4873
4887
  * # Result
@@ -4983,7 +4997,7 @@ struct __pyx_obj_8sqlcycli_3aio_10connection_SSDfCursor {
4983
4997
 
4984
4998
  /* "connection.pxd":81
4985
4999
  *
4986
- * # Connection
5000
+ * # Cursor Manager
4987
5001
  * cdef class CursorManager: # <<<<<<<<<<<<<<
4988
5002
  * cdef:
4989
5003
  * BaseConnection _conn
@@ -5009,9 +5023,9 @@ struct __pyx_obj_8sqlcycli_3aio_10connection_TransactionManager {
5009
5023
  };
5010
5024
 
5011
5025
 
5012
- /* "connection.pxd":91
5013
- * pass
5026
+ /* "connection.pxd":92
5014
5027
  *
5028
+ * # Connection
5015
5029
  * cdef class BaseConnection: # <<<<<<<<<<<<<<
5016
5030
  * cdef:
5017
5031
  * # Basic
@@ -5080,6 +5094,17 @@ struct __pyx_obj_8sqlcycli_3aio_10connection_BaseConnection {
5080
5094
  };
5081
5095
 
5082
5096
 
5097
+ /* "connection.pxd":201
5098
+ * cdef inline bint _set_use_time(self) except -1
5099
+ *
5100
+ * cdef class Connection(BaseConnection): # <<<<<<<<<<<<<<
5101
+ * pass
5102
+ */
5103
+ struct __pyx_obj_8sqlcycli_3aio_10connection_Connection {
5104
+ struct __pyx_obj_8sqlcycli_3aio_10connection_BaseConnection __pyx_base;
5105
+ };
5106
+
5107
+
5083
5108
  /* "sqlcycli/aio/pool.pxd":12
5084
5109
  *
5085
5110
  * # Connection
@@ -6635,7 +6660,7 @@ struct __pyx_vtabstruct_8sqlcycli_7charset_Charset {
6635
6660
  static struct __pyx_vtabstruct_8sqlcycli_7charset_Charset *__pyx_vtabptr_8sqlcycli_7charset_Charset;
6636
6661
 
6637
6662
 
6638
- /* "sqlcycli/charset.pxd":15
6663
+ /* "sqlcycli/charset.pxd":16
6639
6664
  * cpdef bint is_binary(self)
6640
6665
  *
6641
6666
  * cdef class Charsets: # <<<<<<<<<<<<<<
@@ -6645,10 +6670,10 @@ static struct __pyx_vtabstruct_8sqlcycli_7charset_Charset *__pyx_vtabptr_8sqlcyc
6645
6670
 
6646
6671
  struct __pyx_vtabstruct_8sqlcycli_7charset_Charsets {
6647
6672
  int (*add)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, struct __pyx_obj_8sqlcycli_7charset_Charset *, int __pyx_skip_dispatch);
6648
- int (*_add_by_id)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, struct __pyx_obj_8sqlcycli_7charset_Charset *);
6649
- int (*_add_by_name)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, struct __pyx_obj_8sqlcycli_7charset_Charset *);
6650
- int (*_add_by_collation)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, struct __pyx_obj_8sqlcycli_7charset_Charset *);
6651
- int (*_add_by_name_n_collation)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, struct __pyx_obj_8sqlcycli_7charset_Charset *);
6673
+ int (*_index_by_id)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, struct __pyx_obj_8sqlcycli_7charset_Charset *);
6674
+ int (*_index_by_name)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, struct __pyx_obj_8sqlcycli_7charset_Charset *);
6675
+ int (*_index_by_collation)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, struct __pyx_obj_8sqlcycli_7charset_Charset *);
6676
+ int (*_index_by_name_n_collation)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, struct __pyx_obj_8sqlcycli_7charset_Charset *);
6652
6677
  PyObject *(*_gen_charset_n_collate_key)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, PyObject *, PyObject *);
6653
6678
  struct __pyx_obj_8sqlcycli_7charset_Charset *(*by_id)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, PyObject *, int __pyx_skip_dispatch);
6654
6679
  struct __pyx_obj_8sqlcycli_7charset_Charset *(*by_name)(struct __pyx_obj_8sqlcycli_7charset_Charsets *, PyObject *, int __pyx_skip_dispatch);
@@ -6797,11 +6822,14 @@ static struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *__pyx_vtabptr_7cytimes_4pyd
6797
6822
  * # Auth Plugin
6798
6823
  * cdef class AuthPlugin: # <<<<<<<<<<<<<<
6799
6824
  * cdef:
6800
- * object _mysql_native_password
6825
+ * # . plugins registry
6801
6826
  */
6802
6827
 
6803
6828
  struct __pyx_vtabstruct_8sqlcycli_5_auth_AuthPlugin {
6804
6829
  PyObject *(*get)(struct __pyx_obj_8sqlcycli_5_auth_AuthPlugin *, PyObject *, int __pyx_skip_dispatch);
6830
+ int (*set)(struct __pyx_obj_8sqlcycli_5_auth_AuthPlugin *, PyObject *, PyObject *, int __pyx_skip_dispatch);
6831
+ PyObject *(*_validete_plugin_name)(struct __pyx_obj_8sqlcycli_5_auth_AuthPlugin *, PyObject *);
6832
+ PyObject *(*_validate_plugin_handler)(struct __pyx_obj_8sqlcycli_5_auth_AuthPlugin *, PyObject *, PyObject *);
6805
6833
  };
6806
6834
  static struct __pyx_vtabstruct_8sqlcycli_5_auth_AuthPlugin *__pyx_vtabptr_8sqlcycli_5_auth_AuthPlugin;
6807
6835
 
@@ -6997,7 +7025,7 @@ static struct __pyx_vtabstruct_8sqlcycli_10connection_SSDfCursor *__pyx_vtabptr_
6997
7025
 
6998
7026
  /* "connection.pxd":104
6999
7027
  *
7000
- * # Connection
7028
+ * # Cursor Manager
7001
7029
  * cdef class CursorManager: # <<<<<<<<<<<<<<
7002
7030
  * cdef:
7003
7031
  * BaseConnection _conn
@@ -7024,9 +7052,9 @@ struct __pyx_vtabstruct_8sqlcycli_10connection_TransactionManager {
7024
7052
  static struct __pyx_vtabstruct_8sqlcycli_10connection_TransactionManager *__pyx_vtabptr_8sqlcycli_10connection_TransactionManager;
7025
7053
 
7026
7054
 
7027
- /* "connection.pxd":116
7028
- * pass
7055
+ /* "connection.pxd":117
7029
7056
  *
7057
+ * # Connection
7030
7058
  * cdef class BaseConnection: # <<<<<<<<<<<<<<
7031
7059
  * cdef:
7032
7060
  * # Basic
@@ -7107,6 +7135,19 @@ struct __pyx_vtabstruct_8sqlcycli_10connection_BaseConnection {
7107
7135
  static struct __pyx_vtabstruct_8sqlcycli_10connection_BaseConnection *__pyx_vtabptr_8sqlcycli_10connection_BaseConnection;
7108
7136
 
7109
7137
 
7138
+ /* "connection.pxd":270
7139
+ * cdef inline bytes _read_bytes(self, unsigned int size)
7140
+ *
7141
+ * cdef class Connection(BaseConnection): # <<<<<<<<<<<<<<
7142
+ * pass
7143
+ */
7144
+
7145
+ struct __pyx_vtabstruct_8sqlcycli_10connection_Connection {
7146
+ struct __pyx_vtabstruct_8sqlcycli_10connection_BaseConnection __pyx_base;
7147
+ };
7148
+ static struct __pyx_vtabstruct_8sqlcycli_10connection_Connection *__pyx_vtabptr_8sqlcycli_10connection_Connection;
7149
+
7150
+
7110
7151
  /* "connection.pxd":7
7111
7152
  *
7112
7153
  * # Result
@@ -7218,9 +7259,9 @@ struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_SSDfCursor {
7218
7259
  static struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_SSDfCursor *__pyx_vtabptr_8sqlcycli_3aio_10connection_SSDfCursor;
7219
7260
 
7220
7261
 
7221
- /* "connection.pxd":91
7222
- * pass
7262
+ /* "connection.pxd":92
7223
7263
  *
7264
+ * # Connection
7224
7265
  * cdef class BaseConnection: # <<<<<<<<<<<<<<
7225
7266
  * cdef:
7226
7267
  * # Basic
@@ -7257,6 +7298,19 @@ struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_BaseConnection {
7257
7298
  static struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_BaseConnection *__pyx_vtabptr_8sqlcycli_3aio_10connection_BaseConnection;
7258
7299
 
7259
7300
 
7301
+ /* "connection.pxd":201
7302
+ * cdef inline bint _set_use_time(self) except -1
7303
+ *
7304
+ * cdef class Connection(BaseConnection): # <<<<<<<<<<<<<<
7305
+ * pass
7306
+ */
7307
+
7308
+ struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_Connection {
7309
+ struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_BaseConnection __pyx_base;
7310
+ };
7311
+ static struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_Connection *__pyx_vtabptr_8sqlcycli_3aio_10connection_Connection;
7312
+
7313
+
7260
7314
  /* "sqlcycli/aio/pool.pxd":12
7261
7315
  *
7262
7316
  * # Connection
@@ -7343,10 +7397,10 @@ struct __pyx_vtabstruct_8sqlcycli_3aio_4pool_Pool {
7343
7397
  PyObject *(*release)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *, PyObject *, int __pyx_skip_dispatch);
7344
7398
  struct __pyx_obj_8sqlcycli_3aio_4pool_PoolSyncConnection *(*_acquire_sync_conn)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *);
7345
7399
  int (*_release_sync_conn)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *, struct __pyx_obj_8sqlcycli_3aio_4pool_PoolSyncConnection *);
7400
+ int (*_close_sync_conn)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *);
7346
7401
  PyObject *(*close)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *, int __pyx_skip_dispatch);
7347
7402
  int (*terminate)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *, int __pyx_skip_dispatch);
7348
7403
  int (*closed)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *, int __pyx_skip_dispatch);
7349
- int (*_close_sync_conn)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *);
7350
7404
  int (*_verify_open)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *);
7351
7405
  PyObject *(*escape_args)(struct __pyx_obj_8sqlcycli_3aio_4pool_Pool *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8sqlcycli_3aio_4pool_4Pool_escape_args *__pyx_optional_args);
7352
7406
  };
@@ -10685,6 +10739,7 @@ typedef struct {
10685
10739
  PyTypeObject *__pyx_ptype_8sqlcycli_10connection_CursorManager;
10686
10740
  PyTypeObject *__pyx_ptype_8sqlcycli_10connection_TransactionManager;
10687
10741
  PyTypeObject *__pyx_ptype_8sqlcycli_10connection_BaseConnection;
10742
+ PyTypeObject *__pyx_ptype_8sqlcycli_10connection_Connection;
10688
10743
  #if CYTHON_USE_MODULE_STATE
10689
10744
  #endif
10690
10745
  #if CYTHON_USE_MODULE_STATE
@@ -10699,6 +10754,7 @@ typedef struct {
10699
10754
  PyTypeObject *__pyx_ptype_8sqlcycli_3aio_10connection_CursorManager;
10700
10755
  PyTypeObject *__pyx_ptype_8sqlcycli_3aio_10connection_TransactionManager;
10701
10756
  PyTypeObject *__pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection;
10757
+ PyTypeObject *__pyx_ptype_8sqlcycli_3aio_10connection_Connection;
10702
10758
  #if CYTHON_USE_MODULE_STATE
10703
10759
  #endif
10704
10760
  PyTypeObject *__pyx_ptype_8sqlcycli_3aio_4pool_PoolConnection;
@@ -11365,6 +11421,7 @@ static int __pyx_m_clear(PyObject *m) {
11365
11421
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_10connection_CursorManager);
11366
11422
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_10connection_TransactionManager);
11367
11423
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_10connection_BaseConnection);
11424
+ Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_10connection_Connection);
11368
11425
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_MysqlResult);
11369
11426
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_Cursor);
11370
11427
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_DictCursor);
@@ -11375,6 +11432,7 @@ static int __pyx_m_clear(PyObject *m) {
11375
11432
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_CursorManager);
11376
11433
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_TransactionManager);
11377
11434
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection);
11435
+ Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_Connection);
11378
11436
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_4pool_PoolConnection);
11379
11437
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_4pool_PoolSyncConnection);
11380
11438
  Py_CLEAR(clear_module_state->__pyx_ptype_8sqlcycli_3aio_4pool_PoolConnectionManager);
@@ -11993,6 +12051,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
11993
12051
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_10connection_CursorManager);
11994
12052
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_10connection_TransactionManager);
11995
12053
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_10connection_BaseConnection);
12054
+ Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_10connection_Connection);
11996
12055
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_MysqlResult);
11997
12056
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_Cursor);
11998
12057
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_DictCursor);
@@ -12003,6 +12062,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
12003
12062
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_CursorManager);
12004
12063
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_TransactionManager);
12005
12064
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection);
12065
+ Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_10connection_Connection);
12006
12066
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_4pool_PoolConnection);
12007
12067
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_4pool_PoolSyncConnection);
12008
12068
  Py_VISIT(traverse_module_state->__pyx_ptype_8sqlcycli_3aio_4pool_PoolConnectionManager);
@@ -12731,6 +12791,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
12731
12791
  #define __pyx_ptype_8sqlcycli_10connection_CursorManager __pyx_mstate_global->__pyx_ptype_8sqlcycli_10connection_CursorManager
12732
12792
  #define __pyx_ptype_8sqlcycli_10connection_TransactionManager __pyx_mstate_global->__pyx_ptype_8sqlcycli_10connection_TransactionManager
12733
12793
  #define __pyx_ptype_8sqlcycli_10connection_BaseConnection __pyx_mstate_global->__pyx_ptype_8sqlcycli_10connection_BaseConnection
12794
+ #define __pyx_ptype_8sqlcycli_10connection_Connection __pyx_mstate_global->__pyx_ptype_8sqlcycli_10connection_Connection
12734
12795
  #if CYTHON_USE_MODULE_STATE
12735
12796
  #endif
12736
12797
  #if CYTHON_USE_MODULE_STATE
@@ -12745,6 +12806,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
12745
12806
  #define __pyx_ptype_8sqlcycli_3aio_10connection_CursorManager __pyx_mstate_global->__pyx_ptype_8sqlcycli_3aio_10connection_CursorManager
12746
12807
  #define __pyx_ptype_8sqlcycli_3aio_10connection_TransactionManager __pyx_mstate_global->__pyx_ptype_8sqlcycli_3aio_10connection_TransactionManager
12747
12808
  #define __pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection __pyx_mstate_global->__pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection
12809
+ #define __pyx_ptype_8sqlcycli_3aio_10connection_Connection __pyx_mstate_global->__pyx_ptype_8sqlcycli_3aio_10connection_Connection
12748
12810
  #if CYTHON_USE_MODULE_STATE
12749
12811
  #endif
12750
12812
  #define __pyx_ptype_8sqlcycli_3aio_4pool_PoolConnection __pyx_mstate_global->__pyx_ptype_8sqlcycli_3aio_4pool_PoolConnection
@@ -49386,8 +49448,8 @@ static int __Pyx_modinit_type_import_code(void) {
49386
49448
  __Pyx_GOTREF(__pyx_t_1);
49387
49449
  __pyx_ptype_8sqlcycli_7charset_Charset = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.charset", "Charset", sizeof(struct __pyx_obj_8sqlcycli_7charset_Charset), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_7charset_Charset),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_7charset_Charset) __PYX_ERR(5, 4, __pyx_L1_error)
49388
49450
  __pyx_vtabptr_8sqlcycli_7charset_Charset = (struct __pyx_vtabstruct_8sqlcycli_7charset_Charset*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_7charset_Charset); if (unlikely(!__pyx_vtabptr_8sqlcycli_7charset_Charset)) __PYX_ERR(5, 4, __pyx_L1_error)
49389
- __pyx_ptype_8sqlcycli_7charset_Charsets = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.charset", "Charsets", sizeof(struct __pyx_obj_8sqlcycli_7charset_Charsets), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_7charset_Charsets),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_7charset_Charsets) __PYX_ERR(5, 15, __pyx_L1_error)
49390
- __pyx_vtabptr_8sqlcycli_7charset_Charsets = (struct __pyx_vtabstruct_8sqlcycli_7charset_Charsets*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_7charset_Charsets); if (unlikely(!__pyx_vtabptr_8sqlcycli_7charset_Charsets)) __PYX_ERR(5, 15, __pyx_L1_error)
49451
+ __pyx_ptype_8sqlcycli_7charset_Charsets = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.charset", "Charsets", sizeof(struct __pyx_obj_8sqlcycli_7charset_Charsets), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_7charset_Charsets),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_7charset_Charsets) __PYX_ERR(5, 16, __pyx_L1_error)
49452
+ __pyx_vtabptr_8sqlcycli_7charset_Charsets = (struct __pyx_vtabstruct_8sqlcycli_7charset_Charsets*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_7charset_Charsets); if (unlikely(!__pyx_vtabptr_8sqlcycli_7charset_Charsets)) __PYX_ERR(5, 16, __pyx_L1_error)
49391
49453
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49392
49454
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 9, __pyx_L1_error)
49393
49455
  __Pyx_GOTREF(__pyx_t_1);
@@ -49454,8 +49516,10 @@ static int __Pyx_modinit_type_import_code(void) {
49454
49516
  __pyx_vtabptr_8sqlcycli_10connection_CursorManager = (struct __pyx_vtabstruct_8sqlcycli_10connection_CursorManager*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_10connection_CursorManager); if (unlikely(!__pyx_vtabptr_8sqlcycli_10connection_CursorManager)) __PYX_ERR(12, 104, __pyx_L1_error)
49455
49517
  __pyx_ptype_8sqlcycli_10connection_TransactionManager = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.connection", "TransactionManager", sizeof(struct __pyx_obj_8sqlcycli_10connection_TransactionManager), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_10connection_TransactionManager),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_10connection_TransactionManager) __PYX_ERR(12, 113, __pyx_L1_error)
49456
49518
  __pyx_vtabptr_8sqlcycli_10connection_TransactionManager = (struct __pyx_vtabstruct_8sqlcycli_10connection_TransactionManager*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_10connection_TransactionManager); if (unlikely(!__pyx_vtabptr_8sqlcycli_10connection_TransactionManager)) __PYX_ERR(12, 113, __pyx_L1_error)
49457
- __pyx_ptype_8sqlcycli_10connection_BaseConnection = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.connection", "BaseConnection", sizeof(struct __pyx_obj_8sqlcycli_10connection_BaseConnection), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_10connection_BaseConnection),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_10connection_BaseConnection) __PYX_ERR(12, 116, __pyx_L1_error)
49458
- __pyx_vtabptr_8sqlcycli_10connection_BaseConnection = (struct __pyx_vtabstruct_8sqlcycli_10connection_BaseConnection*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_10connection_BaseConnection); if (unlikely(!__pyx_vtabptr_8sqlcycli_10connection_BaseConnection)) __PYX_ERR(12, 116, __pyx_L1_error)
49519
+ __pyx_ptype_8sqlcycli_10connection_BaseConnection = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.connection", "BaseConnection", sizeof(struct __pyx_obj_8sqlcycli_10connection_BaseConnection), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_10connection_BaseConnection),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_10connection_BaseConnection) __PYX_ERR(12, 117, __pyx_L1_error)
49520
+ __pyx_vtabptr_8sqlcycli_10connection_BaseConnection = (struct __pyx_vtabstruct_8sqlcycli_10connection_BaseConnection*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_10connection_BaseConnection); if (unlikely(!__pyx_vtabptr_8sqlcycli_10connection_BaseConnection)) __PYX_ERR(12, 117, __pyx_L1_error)
49521
+ __pyx_ptype_8sqlcycli_10connection_Connection = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.connection", "Connection", sizeof(struct __pyx_obj_8sqlcycli_10connection_Connection), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_10connection_Connection),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_10connection_Connection) __PYX_ERR(12, 270, __pyx_L1_error)
49522
+ __pyx_vtabptr_8sqlcycli_10connection_Connection = (struct __pyx_vtabstruct_8sqlcycli_10connection_Connection*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_10connection_Connection); if (unlikely(!__pyx_vtabptr_8sqlcycli_10connection_Connection)) __PYX_ERR(12, 270, __pyx_L1_error)
49459
49523
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49460
49524
  __pyx_t_1 = PyImport_ImportModule("sqlcycli.aio.connection"); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 7, __pyx_L1_error)
49461
49525
  __Pyx_GOTREF(__pyx_t_1);
@@ -49475,8 +49539,10 @@ static int __Pyx_modinit_type_import_code(void) {
49475
49539
  __pyx_vtabptr_8sqlcycli_3aio_10connection_SSDfCursor = (struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_SSDfCursor*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_3aio_10connection_SSDfCursor); if (unlikely(!__pyx_vtabptr_8sqlcycli_3aio_10connection_SSDfCursor)) __PYX_ERR(13, 77, __pyx_L1_error)
49476
49540
  __pyx_ptype_8sqlcycli_3aio_10connection_CursorManager = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.aio.connection", "CursorManager", sizeof(struct __pyx_obj_8sqlcycli_3aio_10connection_CursorManager), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_3aio_10connection_CursorManager),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_3aio_10connection_CursorManager) __PYX_ERR(13, 81, __pyx_L1_error)
49477
49541
  __pyx_ptype_8sqlcycli_3aio_10connection_TransactionManager = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.aio.connection", "TransactionManager", sizeof(struct __pyx_obj_8sqlcycli_3aio_10connection_TransactionManager), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_3aio_10connection_TransactionManager),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_3aio_10connection_TransactionManager) __PYX_ERR(13, 88, __pyx_L1_error)
49478
- __pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.aio.connection", "BaseConnection", sizeof(struct __pyx_obj_8sqlcycli_3aio_10connection_BaseConnection), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_3aio_10connection_BaseConnection),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection) __PYX_ERR(13, 91, __pyx_L1_error)
49479
- __pyx_vtabptr_8sqlcycli_3aio_10connection_BaseConnection = (struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_BaseConnection*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection); if (unlikely(!__pyx_vtabptr_8sqlcycli_3aio_10connection_BaseConnection)) __PYX_ERR(13, 91, __pyx_L1_error)
49542
+ __pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.aio.connection", "BaseConnection", sizeof(struct __pyx_obj_8sqlcycli_3aio_10connection_BaseConnection), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_3aio_10connection_BaseConnection),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection) __PYX_ERR(13, 92, __pyx_L1_error)
49543
+ __pyx_vtabptr_8sqlcycli_3aio_10connection_BaseConnection = (struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_BaseConnection*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_3aio_10connection_BaseConnection); if (unlikely(!__pyx_vtabptr_8sqlcycli_3aio_10connection_BaseConnection)) __PYX_ERR(13, 92, __pyx_L1_error)
49544
+ __pyx_ptype_8sqlcycli_3aio_10connection_Connection = __Pyx_ImportType_3_0_12(__pyx_t_1, "sqlcycli.aio.connection", "Connection", sizeof(struct __pyx_obj_8sqlcycli_3aio_10connection_Connection), __PYX_GET_STRUCT_ALIGNMENT_3_0_12(struct __pyx_obj_8sqlcycli_3aio_10connection_Connection),__Pyx_ImportType_CheckSize_Warn_3_0_12); if (!__pyx_ptype_8sqlcycli_3aio_10connection_Connection) __PYX_ERR(13, 201, __pyx_L1_error)
49545
+ __pyx_vtabptr_8sqlcycli_3aio_10connection_Connection = (struct __pyx_vtabstruct_8sqlcycli_3aio_10connection_Connection*)__Pyx_GetVtable(__pyx_ptype_8sqlcycli_3aio_10connection_Connection); if (unlikely(!__pyx_vtabptr_8sqlcycli_3aio_10connection_Connection)) __PYX_ERR(13, 201, __pyx_L1_error)
49480
49546
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49481
49547
  __pyx_t_1 = PyImport_ImportModule("sqlcycli.aio.pool"); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 12, __pyx_L1_error)
49482
49548
  __Pyx_GOTREF(__pyx_t_1);
Binary file
@@ -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