Skip to main content
# sql-annotation
> 使用装饰器的方式来执行sql操作.

# Install
* pip: `$ pip install sql-annotation`
* source:
* `$ git clone https://github.com/tomoncle/sql-annotation.git`
* `$ cd sql-annotation`
* `$ python setup.py`


# example:
```python
from sql_annotation.annotation import select
from sql_annotation.conn import connection

connection(username='tom', password='123456', db='test')


@select('select * from t_school WHERE id="#{id}"')
def get_school_by_id(id):
pass


@select('select * from t_school WHERE name like "%#{name}%"')
def get_school_by_name(name):
pass


print get_school_by_id(id='60')
print get_school_by_name(name='乌克兰')
```

Release files for sql-annotation 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sql-annotation 1.0.0
File Size Uploaded
sql-annotation-1.0.0.tar.gz 3.3 kB Details

Release files / sql-annotation-1.0.0.tar.gz

Download URL sql-annotation-1.0.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
575a985bce4603144e594653fd6b2eda034b346e68bba100ad2c8fe794a4e480
BLAKE2b-256 checksum
How to use checksums
d688d1aa4b0096e8d27188584707cc11858801ec01b378f7adbc785f1b87fe38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page