Skip to main content

python sqlite OOP class

Project description

sqlite oop

sqlite Object Oriented

from sqlite import sqlite
db = sqlite("./demo.db")

# create table
createtable = db.table("user_name").create_table({
    "id":"INTEGER PRIMARY KEY AUTOINCREMENT",
    "name":"VARCHAR(80) NOT NULL"
})
print(createtable)

# create datas
insert = db.table("user_name").insert([{"name": "davie"}, {"name": "johan"}])

# create data
insert = db.table("user_name").create({"name": "davie"})

# delete
db.table("user_name").where("id",1).delete()
db.table("user_name").where("name","davie").delete()

# update
db.table("user_name").where("name","davie").updata({"name":"lisa"})

# select
db.table("user_name").where("name","<>","davie").limit(5).select("*")

# find
db.table("user_name").where("name","johan").find("*")

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

sqlite-oop-0.0.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

sqlite_oop-0.0.1-py3-none-any.whl (5.4 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