talksql
Examples
ipcfg = {
'user': '',
'password': '',
'host': '',
'db':'' }
cfg = { 'socket':"/tmp/mysql.sock",
'user': '',
'password': '',
'host': '',
'db':'' }
from talksql import *
con = ipconnect(ipcfg) #or
con = sockconnect(cfg)
#con is mysql connector connection object
Get a resultset
from talksql import *
sql="select * from table where .."
rs,c = xecrs(con,sql)
#rs is array for rows and columns of resultset
#c is cursor mysql connection
# - go to mysql connector if you have to use the cursor to iterate
#this works unless you need to deal with large datasets
Sub data and get a resultset
from talksql import *
sql="select * from table where column=%s"
data=(value,)
#data is %s sub-ed
rs,c = xecrs(con,sql,data)
from talksql import *
sql="delete from table"
#data is %s sub-ed if given like resultset
c = xec(con,sql)
#c is the cursor
Few more
sqlaofa, sqlaofd are experimental and only works as string data
Metadata
Release files for talksql 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| talksql-1.2.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| talksql-1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / talksql-1.2.tar.gz
| Download URL | talksql-1.2.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69eb1ec3882e6edb5d4a1542eb904911269c11c650f3dba598f9202d3b5264a0
|
|
BLAKE2b-256 checksum How to use checksums |
5b15fd8014b9fc03f1fc1c19aacc0993c3fbadea919e1dad3669b2f1ec19648e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0
|
Release files / talksql-1.2-py3-none-any.whl
| Download URL | talksql-1.2-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a23f71b2ca599f6197e314c1032cb05c92490e99f344f71e6bf8fd57ce20c56
|
|
BLAKE2b-256 checksum How to use checksums |
03dc5ea4a4100d208a65728a8c8bcaf6a23d834f3de2d639c95fbd9cc2ac05a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0
|