-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* formating * new api changes * bump version number * bump dependencies
- Loading branch information
Showing
10 changed files
with
258 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
def ${operation_id}( | ||
self, | ||
statement: str, | ||
params: list = None, | ||
consistency: str = "strong", | ||
db_name: str = None, | ||
branch_name: str = None, | ||
) -> ApiResponse: | ||
""" | ||
${description} | ||
|
||
Reference: ${docs_url} | ||
Path: ${path} | ||
Method: ${http_method} | ||
Response status codes: | ||
% for rc in params['response_codes']: | ||
- ${rc["code"]}: ${rc["description"]} | ||
% endfor | ||
% if len(params['response_content_types']) > 1 : | ||
Responses: | ||
% for rc in params['response_content_types']: | ||
- ${rc["content_type"]} | ||
% endfor | ||
% elif len(params['response_content_types']) == 1 : | ||
Response: ${params['response_content_types'][0]["content_type"]} | ||
% endif | ||
|
||
:param statement: str The statement to run | ||
:param params: dict The query parameters list. default: None | ||
:param consistency: str The consistency level for this request. default: strong | ||
:param db_name: str = None The name of the database to query. Default: database name from the client. | ||
:param branch_name: str = None The name of the branch to query. Default: branch name from the client. | ||
|
||
:returns ApiResponse | ||
""" | ||
db_branch_name = self.client.get_db_branch_name(db_name, branch_name) | ||
url_path = f"/db/{db_branch_name}/sql" | ||
headers = {"content-type": "application/json"} | ||
payload = { | ||
"statement": statement, | ||
"params": params, | ||
"consistency": consistency, | ||
} | ||
return self.request("POST", url_path, headers, payload) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters