WSQL-SDK
The chain of tools that make work with SQL procedures easier.
Syntax
#include “<filename>” - include the specified filename, the absolute and relative urls supported.
#define name <value> - specify the value, that can be used as $name
#define name(arg1, …, argN) - the function, that can be used as $name(a1,…aN)
#undef name - undefine previously defined instruction
#if condition expression else alternative - conditional expressions
SELECT … ; – > array - hint, that informs about query returns more that one element
SELECT … ; – > object - hint, that informs about query returns exactly one element
COMMENT “returns union” - hint, to merge all objects from results sets to one
COMMENT “<table name> (<colum name column type>,…);” - hint, that allow to pass the list of arguments to procedure via temporary table
wsql-trans:
The extensions above native SQL.
supports:
macros
#define table_name "mytable"
select * from $table_name;
macro-functions
#define quote(a) "a"
select upper(quote(a));
conditions
#define a 1
#if a == 1
select * from t1;
#else
select * from t2;
#endif
includes
#include "common.sql"
wsql-codegen:
Generate the native code to work with SQL procedures. Now supports python3 native and aio. The C++ under development. Required WSQL.
Hints
SELECT … ; – > array - hint, that informs about query returns more that one element
SELECT … ; – > object - hint, that informs about query returns exactly one element
COMMENT “returns union” - hint, to merge all objects from results sets to one
COMMENT “<table name> (<colum name column type>,…);” - hint, that allow to pass the list of arguments to procedure via temporary table
SQL
CREATE PROCEDURE table1.insert (value VARCHAR(10))
BEGIN
INSERT INTO table1 (value) VALUES(value);
SELECT LAST_INSERT_ID() AS id;
END
Python3
@coroutine
def insert(connection, value=None):
"""
insert, table1
:param value: the value(VARCHAR(10), IN))
:return (id,)
"""
@coroutine
def __query(__connection):
__cursor = __connection.cursor()
try:
yield from __cursor.callproc(b"procedure4", (value,))
return (yield from __cursor.fetchall())[0]
finally:
yield from __cursor.close()
try:
return (yield from connection.execute(__query))
except Error as e:
raise handle_error(exceptions, e)
Metadata
Release files for wsql_sdk 0.3.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| wsql_sdk-0.3.17.tar.gz | 633.2 kB | Without provenance | Details |
Release files / wsql_sdk-0.3.17.tar.gz
| Download URL | wsql_sdk-0.3.17.tar.gz |
|---|---|
| Size | 633.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d31148bc59eedc4bb23fb0c92fc066c3e0ac1d09ca4a77917b1e42f512ed771
|
|
BLAKE2b-256 checksum How to use checksums |
83c2d7fb36dee4f45e55671a25c2fbdc777acdc2f303f215d1d635a33b53ec53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for wsql_sdk 0.3.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.