Hey guys,

As a part of a project that I'm working on, Iv'e created a SQLAlchemy 
statement builder using the ast (abstract syntax trees) library.
This constructor will parse strings that are valid python logical 
statements and will convert them to the appropriate SQLAlchemy objects.

For example:
The constructor will take a string of the following format and a list of 
models/modelbase in which the columns exist.

string_a = '(column_a == 2 or column_b == 3) or column_c in [1,2,3]'    

and returns the SQLAlchemy objects that defines this logic and can be used 
in a query's where clause.

This was used to automate query building for a projects with thousands of 
different logics that where defined by the client.

I was just wondering if you think there is a place for something like that 
in SQLAlchemy or related projects.

Best regards,

Nir

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/a3617ee6-513f-4d4c-a0bb-04dbf83552c0n%40googlegroups.com.

Reply via email to