Skip to main content

A small database operation package

Project description

数据库操作有风险,请谨慎对待!一旦出现问题,阴阳亦爱莫能助。切记,勿忘。

import posql

myconn = posql.mysql(passwd='Ycode01')
myconn.select_table('default', 'test')

""" 增
myconn.sql(0).insert({'domain': 'www.baidu.com', 'position': 'start'})
"""

""" 删
myconn.sql(0).where('`id` > 7').delete()
"""

""" 改
myconn.sql(0).where('`id` = 7').update({'position': 'end'})
"""

""" 查
results = myconn.select()
print(results)
"""

"""
results = myconn.where('`id` = 1').sql(1).select()
print(results)
"""

"""
results = myconn.order(field='id').limit(5).select()
print(results)
"""

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

posql-0.1.2a0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

posql-0.1.2a0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page