text stringlengths 0 828 |
|---|
>>> result = thread.get() |
:param async bool |
:param int page: page number |
:param int size: page size |
:param str sort: page order |
:return: page[State] |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._list_all_states_with_http_info(**kwargs) |
else: |
(data) = cls._list_all_states_with_http_info(**kwargs) |
return data" |
3973,"def replace_state_by_id(cls, state_id, state, **kwargs): |
""""""Replace State |
Replace all attributes of State |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.replace_state_by_id(state_id, state, async=True) |
>>> result = thread.get() |
:param async bool |
:param str state_id: ID of state to replace (required) |
:param State state: Attributes of state to replace (required) |
:return: State |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._replace_state_by_id_with_http_info(state_id, state, **kwargs) |
else: |
(data) = cls._replace_state_by_id_with_http_info(state_id, state, **kwargs) |
return data" |
3974,"def update_state_by_id(cls, state_id, state, **kwargs): |
""""""Update State |
Update attributes of State |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.update_state_by_id(state_id, state, async=True) |
>>> result = thread.get() |
:param async bool |
:param str state_id: ID of state to update. (required) |
:param State state: Attributes of state to update. (required) |
:return: State |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._update_state_by_id_with_http_info(state_id, state, **kwargs) |
else: |
(data) = cls._update_state_by_id_with_http_info(state_id, state, **kwargs) |
return data" |
3975,"def insert_list_of_dictionaries_into_database_tables( |
dbConn, |
log, |
dictList, |
dbTableName, |
uniqueKeyList=[], |
dateModified=False, |
dateCreated=True, |
batchSize=2500, |
replace=False, |
dbSettings=False): |
""""""insert list of dictionaries into database tables |
**Key Arguments:** |
- ``dbConn`` -- mysql database connection |
- ``log`` -- logger |
- ``dictList`` -- list of python dictionaries to add to the database table |
- ``dbTableName`` -- name of the database table |
- ``uniqueKeyList`` -- a list of column names to append as a unique constraint on the database |
- ``dateModified`` -- add the modification date as a column in the database |
- ``dateCreated`` -- add the created date as a column in the database |
- ``batchSize`` -- batch the insert commands into *batchSize* batches |
- ``replace`` -- repalce row if a duplicate is found |
- ``dbSettings`` -- pass in the database settings so multiprocessing can establish one connection per process (might not be faster) |
**Return:** |
- None |
**Usage:** |
.. code-block:: python |
from fundamentals.mysql import insert_list_of_dictionaries_into_database_tables |
insert_list_of_dictionaries_into_database_tables( |
dbConn=dbConn, |
log=log, |
dictList=dictList, |
dbTableName=""test_insert_many"", |
uniqueKeyList=[""col1"", ""col3""], |
dateModified=False, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.