Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/mysql/mysql-connector-python
/ functions
Functions
5,006 in github.com/mysql/mysql-connector-python
⨍
Functions
5,006
◇
Types & classes
734
↳
Endpoints
17
↓ 2,049 callers
Method
execute
Execute the statement. Raises: NotImplementedError: This method must be implemented.
mysqlx-connector-python/lib/mysqlx/statement.py:245
↓ 1,369 callers
Method
execute
( self, operation: str, params: Optional[ParamsSequenceOrDictType] = None, map
mysql-connector-python/lib/mysql/connector/cursor.py:360
↓ 727 callers
Method
cursor
Instantiates and returns a cursor By default, MySQLCursor is returned. Depending on the options while connecting, a buffered and/or r
mysql-connector-python/lib/mysql/connector/connection.py:1372
↓ 701 callers
Method
sql
Creates a :class:`mysqlx.SqlStatement` object to allow running the SQL statement on the target MySQL Server. Args: sql (s
mysqlx-connector-python/lib/mysqlx/connection.py:2301
↓ 502 callers
Method
fetch_all
Fetch all items. Returns: `list`: The list of items of :class:`mysqlx.DbDoc` or :class:`mysqlx.Row`.
mysqlx-connector-python/lib/mysqlx/result.py:1067
↓ 481 callers
Method
cmd_query
( self, query: StrOrBytes, raw: bool = False, buffered: bool = False,
mysql-connector-python/lib/mysql/connector/connection.py:883
↓ 384 callers
Method
values
Set the values to be inserted. Args: *values: The values of the columns to be inserted. Returns: mysqlx.Inse
mysqlx-connector-python/lib/mysqlx/statement.py:1210
↓ 381 callers
Method
add
Adds a list of documents to a collection. Args: *values: The document list to be added into the collection. Returns:
mysqlx-connector-python/lib/mysqlx/crud.py:494
↓ 363 callers
Method
close
Close the cursor Returns True when successful, otherwise False.
mysql-connector-python/lib/mysql/connector/cursor.py:259
↓ 353 callers
Method
find
Retrieves documents from a collection. Args: condition (Optional[str]): The string with the filter expression of
mysqlx-connector-python/lib/mysqlx/crud.py:483
↓ 353 callers
Method
get
Returns the value of an element of the message dictionary. Args: name (string): Key name. default (object): The defau
mysqlx-connector-python/lib/mysqlx/protobuf/__init__.py:470
↓ 316 callers
Method
connect
(self, **kwargs)
mysql-connector-python/tests/test_connection.py:221
↓ 306 callers
Method
fetchall
Return all rows of a query result set. Returns: list: A list of tuples with all rows of a query result set.
mysql-connector-python/lib/mysql/connector/cursor.py:793
↓ 280 callers
Method
drop_collection
Drops a collection. Args: name (str): The name of the collection to be dropped.
mysqlx-connector-python/lib/mysqlx/crud.py:288
↓ 270 callers
Method
get_session
Creates a Session instance using the provided connection data. Returns: Session: Session object.
mysqlx-connector-python/lib/mysqlx/connection.py:2614
↓ 268 callers
Method
create_collection
Creates in the current schema a new collection with the specified name and retrieves an object representing the new collection created.
mysqlx-connector-python/lib/mysqlx/crud.py:302
↓ 241 callers
Method
copy
Returns a new copy of a :class:`mysqlx.DbDoc` object containing the `doc_id` provided. If `doc_id` is not provided, it will be removed from
mysqlx-connector-python/lib/mysqlx/dbdoc.py:86
↓ 239 callers
Method
fetchone
Return next row of a query result set. Returns: tuple or None: A row from query result set.
mysql-connector-python/lib/mysql/connector/cursor.py:764
↓ 227 callers
Method
get_table
Returns the table of the given name for this schema. Returns: mysqlx.Table: Table object.
mysqlx-connector-python/lib/mysqlx/crud.py:252
↓ 207 callers
Method
where
Sets the search condition to filter. Args: condition (str): Sets the search condition to filter records. Returns:
mysqlx-connector-python/lib/mysqlx/statement.py:1153
↓ 193 callers
Method
select
Creates a new :class:`mysqlx.SelectStatement` object. Args: *fields: The fields to be retrieved. Returns: my
mysqlx-connector-python/lib/mysqlx/crud.py:680
↓ 180 callers
Method
insert
Creates a new :class:`mysqlx.InsertStatement` object. Args: *fields: The fields to be inserted. Returns: mys
mysqlx-connector-python/lib/mysqlx/crud.py:693
↓ 173 callers
Method
count
Counts the rows in the table. Returns: int: The total of rows in the table.
mysqlx-connector-python/lib/mysqlx/crud.py:729
↓ 164 callers
Method
set
Sets or updates attributes on documents in a collection. Args: doc_path (string): The document path of the item to be set.
mysqlx-connector-python/lib/mysqlx/statement.py:837
↓ 148 callers
Method
close
Closes the sessions opened by this client.
mysqlx-connector-python/lib/mysqlx/connection.py:2624
↓ 147 callers
Method
get_affected_items_count
Returns the number of affected items for the last operation. Returns: int: The number of affected items.
mysqlx-connector-python/lib/mysqlx/result.py:869
↓ 131 callers
Method
get_schema
Retrieves a Schema object from the current session by it's name. Args: name (string): The name of the Schema object to be retriev
mysqlx-connector-python/lib/mysqlx/connection.py:2332
↓ 126 callers
Method
get_rows
Get all rows returned by the MySQL server This method gets all rows returned by the MySQL server after sending, for example, the quer
mysql-connector-python/lib/mysql/connector/connection.py:795
↓ 126 callers
Method
start_transaction
Starts a transaction context on the server.
mysqlx-connector-python/lib/mysqlx/connection.py:2395
↓ 124 callers
Method
modify
Modifies documents based on the ``condition``. Args: condition (str): The string with the filter expression of the
mysqlx-connector-python/lib/mysqlx/crud.py:522
↓ 123 callers
Method
commit
Commits all the operations executed after a call to startTransaction().
mysqlx-connector-python/lib/mysqlx/connection.py:2399
↓ 118 callers
Method
create_index
Creates a collection index. Args: index_name (str): Index name. fields_desc (dict): A dictionary containing the field
mysqlx-connector-python/lib/mysqlx/crud.py:559
↓ 114 callers
Method
executemany
Execute the given operation multiple times The executemany() method will execute the operation iterating over the list of parameters
mysql-connector-python/lib/mysql/connector/cursor.py:481
↓ 99 callers
Method
update
Creates a new :class:`mysqlx.UpdateStatement` object. Returns: mysqlx.UpdateStatement: UpdateStatement object
mysqlx-connector-python/lib/mysqlx/crud.py:706
↓ 90 callers
Method
bind
Binds value(s) to a specific placeholder(s). Args: *args: The value(s) to bind. Returns: mysqlx.SqlStatement
mysqlx-connector-python/lib/mysqlx/statement.py:638
↓ 86 callers
Method
commit
Commit current transaction
mysql-connector-python/lib/mysql/connector/connection.py:1454
↓ 85 callers
Method
close
(self)
mysql-connector-python/lib/mysql/connector/connection.py:450
↓ 72 callers
Function
mysqlxpb_enum
Returns the value of a MySQL X Protobuf enumerator. Args: name (string): MySQL X Protobuf numerator name. Returns: int: Valu
mysqlx-connector-python/lib/mysqlx/protobuf/__init__.py:618
↓ 69 callers
Method
start
(self, **kwargs)
mysqlx-connector-python/tests/mysqld.py:688
↓ 66 callers
Method
limit
Sets the maximum number of items to be returned. Args: row_count (int): The maximum number of items. Returns:
mysqlx-connector-python/lib/mysqlx/statement.py:513
↓ 66 callers
Method
lock_exclusive
Execute a read operation with `EXCLUSIVE LOCK`. Only one lock can be active at a time. Args: lock_contention (:class:`
mysqlx-connector-python/lib/mysqlx/statement.py:1052
↓ 65 callers
Method
get_message
Returns the dictionary representing a message containing parsed data. Returns: dict: The dictionary representing a messag
mysqlx-connector-python/lib/mysqlx/protobuf/__init__.py:496
↓ 63 callers
Method
fields
Sets a document field filter. Args: *fields: The string expressions identifying the fields to be extracted.
mysqlx-connector-python/lib/mysqlx/statement.py:1117
↓ 60 callers
Method
consume_token
(self, token_type: int)
mysqlx-connector-python/lib/mysqlx/expr.py:683
↓ 60 callers
Method
get_collection
Returns the collection of the given name for this schema. Returns: mysqlx.Collection: Collection object.
mysqlx-connector-python/lib/mysqlx/crud.py:276
↓ 59 callers
Method
exists_in_database
Verifies if this object exists in the database. Returns: bool: `True` if object exists in database.
mysqlx-connector-python/lib/mysqlx/crud.py:769
↓ 58 callers
Method
fetch_one
Fetch one item. Returns: :class:`mysqlx.Row` or :class:`mysqlx.DbDoc`: one result item.
mysqlx-connector-python/lib/mysqlx/result.py:1056
↓ 57 callers
Method
assertIsInstance
(self, obj, cls, msg=None)
mysql-connector-python/tests/__init__.py:723
↓ 57 callers
Method
lock_shared
Execute a read operation with `SHARED LOCK`. Only one lock can be active at a time. Args: lock_contention (:class:`mys
mysqlx-connector-python/lib/mysqlx/statement.py:1038
↓ 56 callers
Method
remove
Remove the topdir of the MySQL server
mysqlx-connector-python/tests/mysqld.py:773
↓ 56 callers
Method
sort
Sets the sorting criteria. Args: *clauses: The expression strings defining the sort criteria. Returns: mysql
mysqlx-connector-python/lib/mysqlx/statement.py:1129
↓ 53 callers
Method
write
(self, data)
mysql-connector-python/tests/__init__.py:224
↓ 52 callers
Method
_drop_collection_if_exists
(self, name)
mysqlx-connector-python/tests/qa/test_qa_mysqlx_crud_collection_find.py:43
↓ 50 callers
Function
build_uri
(**kwargs)
mysqlx-connector-python/tests/test_mysqlx_connection.py:359
↓ 50 callers
Method
reset
(self)
mysql-connector-python/tests/__init__.py:204
↓ 49 callers
Method
patch
Takes a :class:`mysqlx.DbDoc`, string JSON format or a dict with the changes and applies it on all matching documents. Args:
mysqlx-connector-python/lib/mysqlx/statement.py:936
↓ 49 callers
Method
read
Read packets from the MySQL server.
mysql-connector-python/lib/mysql/connector/aio/network.py:641
↓ 44 callers
Method
drop_index
Drops a collection index. Args: index_name (str): Index name.
mysqlx-connector-python/lib/mysqlx/crud.py:585
↓ 42 callers
Method
add_packet
(self, packet)
mysql-connector-python/tests/__init__.py:197
↓ 42 callers
Method
fetchmany
Return the next set of rows of a query result set. When no more rows are available, it returns an empty list. The number of rows retu
mysql-connector-python/lib/mysql/connector/cursor.py:773
↓ 41 callers
Method
get_generated_ids
Returns the generated ids.
mysqlx-connector-python/lib/mysqlx/result.py:966
↓ 41 callers
Method
set_charset_collation
Sets the character set and collation for the current connection. This method sets the character set and collation to be used for the
mysql-connector-python/lib/mysql/connector/abstracts.py:1379
↓ 39 callers
Method
get_string
Returns the value using the column name. Args: str_index (str): The column name. .. deprecated:: 8.0.12
mysqlx-connector-python/lib/mysqlx/result.py:832
↓ 38 callers
Method
_drop_collection_if_exists
(self, name)
mysqlx-connector-python/tests/qa/test_qa_mysqlx_crud_collection_modify.py:41
↓ 38 callers
Method
callproc
Calls a stored procedure with the given arguments The arguments will be set during this session, meaning they will be called like _<
mysql-connector-python/lib/mysql/connector/cursor.py:551
↓ 38 callers
Method
recv
Get packet from the MySQL server comm channel.
mysql-connector-python/lib/mysql/connector/network.py:658
↓ 38 callers
Method
start
(self, **kwargs)
mysql-connector-python/tests/mysqld.py:688
↓ 37 callers
Function
atomic_transaction
Context manager that wraps a MySQL database cursor and ensures transaction rollback in case of exception. NOTE: DDL statements such as C
mysql-connector-python/lib/mysql/ai/utils/atomic_cursor.py:43
↓ 37 callers
Method
fetchsets
Generates the result sets stream caused by the last `execute*()`. Returns: A 2-tuple; the first element is the statement that cau
mysql-connector-python/lib/mysql/connector/abstracts.py:2866
↓ 37 callers
Function
get_mysql_config
Get MySQL server configuration for running MySQL server If no name is given, then we will return the configuration of the first added.
mysql-connector-python/tests/__init__.py:393
↓ 36 callers
Method
cur_token_type_is
(self, token_type: int)
mysqlx-connector-python/lib/mysqlx/expr.py:665
↓ 36 callers
Method
delete
Creates a new :class:`mysqlx.DeleteStatement` object. Returns: mysqlx.DeleteStatement: DeleteStatement object .. version
mysqlx-connector-python/lib/mysqlx/crud.py:716
↓ 36 callers
Method
rollback
Discards all the operations executed after a call to startTransaction().
mysqlx-connector-python/lib/mysqlx/connection.py:2405
↓ 36 callers
Method
set_savepoint
Creates a transaction savepoint. If a name is not provided, one will be generated using the uuid.uuid1() function. Args:
mysqlx-connector-python/lib/mysqlx/connection.py:2411
↓ 34 callers
Method
auth_response
Make the client's authorization response. Args: auth_data: Authorization data. kwargs: Custom configuration to be pas
mysql-connector-python/lib/mysql/connector/plugins/__init__.py:76
↓ 34 callers
Function
drop_table
(schema, table_name)
mysqlx-connector-python/tests/test_mysqlx_crud.py:74
↓ 32 callers
Method
add_attribute
Adds a query attribute and its value into the connector's query attributes list. Query attributes must be enabled on the server - they are di
mysql-connector-python/lib/mysql/connector/abstracts.py:3142
↓ 32 callers
Function
execute_sql
Execute an SQL query with optional parameters using the given cursor. Args: cursor: MySQLCursorAbstract object to execute the query.
mysql-connector-python/lib/mysql/ai/utils/utils.py:120
↓ 32 callers
Method
get_clean_mysql_config
(self)
mysql-connector-python/tests/qa/test_qa_wl7228.py:64
↓ 31 callers
Method
_drop_collection_if_exists
(self, name)
mysqlx-connector-python/tests/qa/test_qa_mysqlx_crud_collection_add.py:75
↓ 31 callers
Function
validate_name
Validate that the string is a legal SQL identifier (letters, digits, underscores). Args: name: Name (schema, table, or column) to va
mysql-connector-python/lib/mysql/ai/utils/utils.py:461
↓ 30 callers
Method
keys
Returns the keys. Returns: `list`: The keys.
mysqlx-connector-python/lib/mysqlx/dbdoc.py:104
↓ 30 callers
Method
reconnect
Attempts to reconnect to the MySQL server. The argument `attempts` should be the number of times a reconnect is tried. The `delay` ar
mysql-connector-python/lib/mysql/connector/abstracts.py:1635
↓ 29 callers
Method
_drop_collection_if_exists
(self, name)
mysqlx-connector-python/tests/qa/test_qa_mysqlx_crud_collection_index.py:41
↓ 29 callers
Method
get_default
Get the default client options set Returns a flag with all the default client options set
mysql-connector-python/lib/mysql/connector/constants.py:798
↓ 28 callers
Method
add_packets
(self, packets)
mysql-connector-python/tests/__init__.py:200
↓ 28 callers
Method
stop
Stop the MySQL server Stop the MySQL server and returns whether it was successful or not. This method stops the process and exits wh
mysql-connector-python/tests/mysqld.py:724
↓ 28 callers
Method
write
Send packets to the MySQL server.
mysql-connector-python/lib/mysql/connector/aio/network.py:624
↓ 27 callers
Method
config
Configuration is done through the pool. For pooled connections, the `config()` method raises a `PoolError` exception. Configuration f
mysql-connector-python/lib/mysql/connector/pooling.py:416
↓ 27 callers
Method
expr
(self, reparse: bool = False)
mysqlx-connector-python/lib/mysqlx/expr.py:1284
↓ 27 callers
Method
fit
Fit a model using DataFrame inputs. If an 'id' column is defined in either dataframe, it will be used as the primary key. R
mysql-connector-python/lib/mysql/ai/ml/model.py:552
↓ 26 callers
Method
get_name
Returns the name of this database object. Returns: str: The name of this database object.
mysqlx-connector-python/lib/mysqlx/crud.py:131
↓ 26 callers
Method
handle_unread_result
Check whether there is an unread result
mysql-connector-python/lib/mysql/connector/connection.py:1779
↓ 25 callers
Method
_drop_collection_if_exists
(self, name)
mysqlx-connector-python/tests/qa/test_qa_mysqlx_api_transaction.py:45
↓ 25 callers
Method
free_result
Frees the result
mysql-connector-python/lib/mysql/connector/connection_cext.py:596
↓ 25 callers
Method
read
Receive data from the socket. Args: count (int): Buffer size. Returns: bytes: The data received.
mysqlx-connector-python/lib/mysqlx/connection.py:301
↓ 24 callers
Method
_test_with_tgt_cache
Test with cached valid TGT.
mysql-connector-python/tests/test_authentication.py:634
↓ 24 callers
Method
_test_with_tgt_cache
Test with cached valid TGT.
mysql-connector-python/tests/test_aio_authentication.py:595
↓ 24 callers
Method
send
Send `payload` to the MySQL server. NOTE: if `payload` is an instance of `bytearray`, then `payload` might be changed by this method
mysql-connector-python/lib/mysql/connector/network.py:626
↓ 23 callers
Method
check_method
(self, obj, method)
mysql-connector-python/tests/__init__.py:680
next →
1–100 of 5,006, ranked by callers