rolobio / dictorm Goto Github PK
View Code? Open in Web Editor NEWUse Postgresql/Sqlite as if it were a Python Dictionary
License: Apache License 2.0
Use Postgresql/Sqlite as if it were a Python Dictionary
License: Apache License 2.0
Table.get_one
accepts arbitrary keywords and doesn't raise an error.
It looks like this is due to these lines in pg.py
:
from psycopg2.extensions import cursor
mogrify = cursor.mogrify
It doesn't look like mogrify
is used anywhere.
Here's the error:
$ pip install --user dictorm
Collecting dictorm
Downloading dictorm-3.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/data/data/com.termux/files/tmp/pip-build-0txo2_cf/dictorm/dictorm/dictorm.py", line 10, in <module>
from dictorm.pg import Select, Insert, Update, Delete, And
File "/data/data/com.termux/files/tmp/pip-build-0txo2_cf/dictorm/dictorm/pg.py", line 8, in <module>
from psycopg2.extensions import cursor
ModuleNotFoundError: No module named 'psycopg2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/data/com.termux/files/tmp/pip-build-0txo2_cf/dictorm/dictorm/__init__.py", line 2, in <module>
from dictorm.dictorm import * # pragma: no cover
File "/data/data/com.termux/files/tmp/pip-build-0txo2_cf/dictorm/dictorm/dictorm.py", line 16, in <module>
from .pg import Select, Insert, Update, Delete, And
File "/data/data/com.termux/files/tmp/pip-build-0txo2_cf/dictorm/dictorm/pg.py", line 8, in <module>
from psycopg2.extensions import cursor
ModuleNotFoundError: No module named 'psycopg2'
DictORM attempts to update a generated column.
CREATE TABLE foo (
id SERIAL PRIMARY KEY,
text_row TEXT,
id_times_2 INT GENERATED AS (id * 2) STORED
);
>>> Foo = db['foo']
>>> row = Foo().flush()
>>> row['text_row'] = 'foobar'
>>> row.flush()
psycopg2.errors.SyntaxError: column "id_times_2" can only be updated to DEFAULT
DETAIL: Column "id_times_2" is a generated column.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.