Skip to content

sprin/qjb-qexec-sqlalchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

qjb-qexec-sqlalchemy

quijibo Query Executor for SQL Alchemy. Given an SQL Alchemy Table to be queried, this Executor interprets quijibo Query Trees and constructs an SQL Alchemy query, optionally executing it immediately.

The typical use case is executing a JSON-serialized quijibo Query Tree that has been received in the form of an AJAX request.

Wait, web clients can execute SQL?

No, not really. They can build Query Trees using JavaScript objects that will be safely translated to a limited subset of SQL.

What SQL dialects are supported?

PostgreSQL.

What kinds of queries can you do?

Because the JSON objects mirror the structure of SQL Alchemy Expression Language queries, which mirror the structure of the query tree (the result of parsing the SQL statement), it is theoretically possible for Quijibo to be able execute any arbitrary query that Alchemy can. How much power you want to give the client to query should be up to you, so it is planned to make the possible query constructs highly configurable.

Watch this space

Currently, simple SELECTs on a single view or base table are possible. Most of the current emphasis is on complex qualifications (WHERE). However, if you like to just take the qualification and insert it anywhere in to a server-defined query, you can do so.

It is planned to continue extending the capabilities of this Quijibo Query Executor as the demand arises, but with only "safe" constructs possible.

A "dangerous" add-on is planned, for the cases where you can ensure an authenticated client is mapped to a database user with strictly defined privileges.

About

Quijibo Query Executor for SQL Alchemy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages