postgresql_fastquery
"postgresql_fastquery" is a module or library designed to simplify Postgresql database interactions and CRUD operations.
if you're considering using "mysql_fastconnector" in your projects, it's essential to refer to its resources to get a more detailed understanding of its capabilities, how to integrate it into your applications, and any specific benefits it offers compared to other MySQL connectors or libraries. Additionally, checking for updates and community feedback can help you gauge its reliability and suitability for your needs.
Required client and connector
pip install psycopg2
Postgresql Database connection example
from postgresql_fastquery import Model ,table,query
obj=Model.connect(database="user", user = "postgres", password = "admin123", host = "127.0.0.1")
Postgresql Query Example
res=query("select * from users").fetchAll()
for v in res:
print(res)
Object based Query Example
res=table("players").all()
res=table("players").one()
res=table("players").fromTable('pk').where('pk=37').all()
res=table("players").fromTable('pk').where('pk=37').limit(0,50).all()
res=table("players").fromTable('players.pk').leftJoin('player_images','player_id=players.pk').where('players.pk=37').limit(0,50).all()
res=table("players").fromTable('players.pk').rightJoin('player_images','player_id=players.pk').where('players.pk=37').limit(0,50).all()
for v in res:
print(res)
## Print Query Example
users=table("users")
users.printQuery=True
res=users.fromTable('users.pk').leftJoin('images','user_id=users.pk').where('users.pk=27').limit(50,0).all()
for v in res:
print(res)
## Sub Query Example
users=table("users")
users.printQuery=True
users.subQuery("(select count(*) from users ) as m,")
res=users.fromTable('users.pk').leftJoin('images','user_id=users.pk').where('users.pk=27').limit(50,0).all()
for v in res:
print(res)
Insert Example
id=obj.table("players").insert({'first_name':'r222222222','last_name':'r33333333','id':'555','email':'aa@gmail.com','mobile':'987654321'}).getId()
print(id)
ids=obj.table("players").insertMany([{'first_name':'r222222222','last_name':'r33333333','id':'555','email':'aa@gmail.com','mobile':'987654321'},{'first_name':'r222222223333333333','last_name':'r33333333','id':'555','email':'aa@gmail.com','mobile':'987654321'}])
print(ids)
update Example
id=obj.table("players").update({'first_name':'0000000000000000000','last_name':'r33333333','id':'555','email':'aa@gmail.com','mobile':'987654321'},"pk=66")
delete Example
table("players").delete("pk=66")
Any help , contact me
email : ilayaraja.python@gmail.com
Metadata
Release files for postgresql-fastquery 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| postgresql_fastquery-0.0.3.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| postgresql_fastquery-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / postgresql_fastquery-0.0.3.tar.gz
| Download URL | postgresql_fastquery-0.0.3.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4011ad46020b542e0c53f1c9de86d3fd7e93b222c564354961a57803cc58f54
|
|
BLAKE2b-256 checksum How to use checksums |
1d98434bc681ccc1c75bef4209ce7ded3935cb3cc35b54438c089fdcb09dd55e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / postgresql_fastquery-0.0.3-py3-none-any.whl
| Download URL | postgresql_fastquery-0.0.3-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d9c785f92fd61d6e26504c94c741a38ac7b6ff5c5d8b2e09806057928f180af
|
|
BLAKE2b-256 checksum How to use checksums |
7a0700c26700237aba59be9bf5ce5ac24050a17c2eed7a31aec31f30e686a711
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|