Library to use more sql-commands
Project description
sqlextension
This module makes some SQL commands available for use with python-sql.
Install
pip install mds-sqlextension
Available SQL functions
AnyInArray (any)
ArrayAgg (array_agg)
Ascii (ascii)
Concat2 (concat)
FuzzyEqal (%)
Lower (lower)
Replace (replace)
ReplaceRegexp (regexp_replace)
RPad (rpad)
SplitPart (split_part)
StringAgg (string_agg)
Available SQL expressions
Overlaps ( (start1, end1) overlaps (start2, end2) ):
tab1.select( tab1.id, where=Overlaps('2017-10-01', '2017-10-15', tab1.start, tab1.end) == True )
To make FuzzyEqual work, call CREATE EXTENSION pg_trgm; in PostgreSQL.
Requires
python-sql
Changes
0.1.6 - 03/08/2018
added expression: Overlaps
0.1.5 - 02/01/2018
added function: ReplaceRegexp
0.1.4 - 12/14/2017
bugfix: import-syntax in python3
added docstrings for help
0.1.3 - 07/14/2017
added ‘split_part’
0.1.2 - 06/09/2017
import optimized
0.1.1 - 06/09/2017
first public version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for mds_sqlextension-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 447e5eeb43b43cc3c02e805f54257126511444fdee58b824a4a750fa15b8394b |
|
MD5 | 1ab185280ea9190df8e4ac2048535574 |
|
BLAKE2b-256 | a5418d82f4ccf9ec7c44e56f314130dabc543502bef65123169927dbfffd14bc |
Hashes for mds_sqlextension-0.1.6-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fc87f15eb976f9777e6e83a4039b0a7786bbf32aae04ccdbe12f03b38362578 |
|
MD5 | b1bee8682858c7e25b059f29642abc41 |
|
BLAKE2b-256 | b18242db1ecc342fa7c9801c6dc2bc8a76fcd80a35be7a0092a5583d1542c1db |