ygbr / sqlasagna Goto Github PK
View Code? Open in Web Editor NEWA SQLSoup-like extension for SQLAlchemy with automatic table, relationship and backref mapper to ORM. Because Lasagna tastes better than soup!
A SQLSoup-like extension for SQLAlchemy with automatic table, relationship and backref mapper to ORM. Because Lasagna tastes better than soup!
should we instance temporary objects and return them or use the sessions query / methods with execute ?
The group_by should return a grouped query object as in:
db.session.query(db.TableObj).group_by(db.TableObj.whatever)
Check how to map those kinds of relationships, and specially how do we identify association tables.
We should define how to configure SQLAlchemy configuration.
We should be able to externally configure the engine and connection. We also should be able to reload mapping / reconnect.
We should be able to change connection strings on the fly and reconnect.
This is required for turning SQLasagna into a python package for public usage.
Tables shall have a working count implementation.
We should get the relations based on ForeignKey analysis of the metadata reflected table lists.
Then we should update all relationship-linked objects and create the backref's.
This class will also allow external configuration. Something like:
from sqlasagna import sqlasagna
db = sqlasagna( engine_connection_params, mapper_customization_dict, relationship_customization_dict )
db.users.all()
db.users.query()
etc...
This way we can override relationships, backrefs, one-to-one, many-to-many configs.
Also this will allow us to disable relationship mappings which we do not want and set lazy or eager loading styles by default per relationship.
This should probably be a dict, past to the Lasagna initializer.
I cannot find sqlasagna in pypi, and therefore also not install it as described in the docs.
either the docs should be adjusted or the tool uploaded to pypi
After we have a class and configurations we can have a true python package :)
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.