text
stringlengths 0
828
|
---|
output = output.getvalue() |
output = output.strip() |
if csvType in [""markdown""]: |
output = output.replace(""|--"", ""|:-"") |
if csvType in [""reST""]: |
output = output.replace(""|--"", ""+--"").replace(""--|"", ""--+"") |
self.log.debug( |
'completed the ``_list_of_dictionaries_to_csv`` function') |
return output" |
4785,"def _list_of_dictionaries_to_mysql_inserts( |
self, |
tableName, |
createStatement=None): |
""""""Convert a python list of dictionaries to pretty csv output |
**Key Arguments:** |
- ``tableName`` -- the name of the table to create the insert statements for |
- ``createStatement`` -- add this create statement to the top of the file. Will only be executed if no table of that name exists in database. Default *None* |
**Return:** |
- ``output`` -- the mysql insert statements (as a string) |
"""""" |
self.log.debug( |
'completed the ````_list_of_dictionaries_to_mysql_inserts`` function') |
if not len(self.listOfDictionaries): |
return ""NO MATCH"" |
dataCopy = copy.deepcopy(self.listOfDictionaries) |
if createStatement: |
output = createStatement + ""\n"" |
else: |
output = """" |
inserts = [] |
inserts = [] |
inserts[:] = [convert_dictionary_to_mysql_table(log=self.log, dictionary=d, dbTableName=tableName, uniqueKeyList=[ |
], dateModified=False, returnInsertOnly=True, replace=True, batchInserts=False, reDatetime=self.reDatetime) for d in dataCopy] |
output += "";\n"".join(inserts) + "";"" |
self.log.debug( |
'completed the ``_list_of_dictionaries_to_mysql_inserts`` function') |
return output" |
4786,"def create_payment_token(cls, payment_token, **kwargs): |
""""""Create PaymentToken |
Create a new PaymentToken |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.create_payment_token(payment_token, async=True) |
>>> result = thread.get() |
:param async bool |
:param PaymentToken payment_token: Attributes of paymentToken to create (required) |
:return: PaymentToken |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._create_payment_token_with_http_info(payment_token, **kwargs) |
else: |
(data) = cls._create_payment_token_with_http_info(payment_token, **kwargs) |
return data" |
4787,"def delete_payment_token_by_id(cls, payment_token_id, **kwargs): |
""""""Delete PaymentToken |
Delete an instance of PaymentToken by its ID. |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.delete_payment_token_by_id(payment_token_id, async=True) |
>>> result = thread.get() |
:param async bool |
:param str payment_token_id: ID of paymentToken to delete. (required) |
:return: None |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._delete_payment_token_by_id_with_http_info(payment_token_id, **kwargs) |
else: |
(data) = cls._delete_payment_token_by_id_with_http_info(payment_token_id, **kwargs) |
return data" |
4788,"def get_payment_token_by_id(cls, payment_token_id, **kwargs): |
""""""Find PaymentToken |
Return single instance of PaymentToken by its ID. |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.get_payment_token_by_id(payment_token_id, async=True) |
>>> result = thread.get() |
:param async bool |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.