Everything you need from an SQL database should be within walking distance.
Please read our beautiful documentation for the latest version here.
A Clojure(script) SQL library for building APIs: Datomic® (GraphQL-ish) pull syntax, data driven configuration, dynamic filtering with relations in mind
Home Page: https://walkable.gitlab.io/
License: Eclipse Public License 2.0
Everything you need from an SQL database should be within walking distance.
Please read our beautiful documentation for the latest version here.
To make walkable-sql compatible with fulcro-sql.
Should be implemented as a pathom plugin.
instead of just call reverse against the associated join-seq
I'm trying to test walkable
on a fulcro
setup with postgres
database and it's generating a query syntax that is not supported by postgres. I dig thru the code and it looks likethe generation select queries with back tick. Or possible that I'm missing something here. Can you help? Thanks
and make use of compiled schema, instead of being sample code
Currently operators must be one of =
, >
, <
etc. Users should be able to add their own operators, too
Make use of join aliases so no name collisions
The SQL builder is written in plain Clojure data structure hence it should work in both Clojure and Clojurescript
Generated column names in WHERE should in the alias form (aka Clojuric form)
WHERE `column/name` = 1
instead of
WHERE `column`.`name` = 1
rename sql-pull to pull-entities
Maybe related to #9
add script to replace string to generate migration for postgresql and sqlite from mysql's
along with :required-columns
.
May consider :required-parent-columns
, too
Pull extra data to an entity's keyword with custom sql queries
in that case, should use the provided source table instead of infer from the condition keyword
See
walkable/src/walkable/sql_query_builder.cljc
Line 422 in 9621f1c
Due to the use of flatten-multi-keys
later, also the following keys are basically mandatory for a schema:
joins
cardinality
extra-conditions
While the first two most likely always exist anyways in any non-trivial example, extra-conditions
might actually not be needed and the assert thrown later in flatten-multi-keys
is way more confusing than just making them req-un
for now?
so checking if a keyword is of type ident
is fast
this is only relevant to a join child:
SELECT foo.col AS `foo/col`, foo.id AS `foo/id` FROM foo WHERE foo.id = ?
1
vs
SELECT foo.col AS `foo/col`, 1 AS `foo/id` FROM foo WHERE foo.id = ?
1
Both full keyword aliases like :table/name
→ :other-table/other-name
as well as table aliases like :table/*
→ :other-table/*
.
Should be implemented as a pathom plugin.
Some database eg sqlite won't work with table or column whose name is a reserved keyword. Generated SQL strings should contains:
`table`.`column`
instead of table.column
because join source column value will be nil
and results in invalid sql queries
Currently not operators are embedded into keywords: :not=
, :not-in
etc
Should support something like [:not [:or [:= 2] [:= 3]]]
.
how sql queries are built and when entities are assoc
ed into env
will refactor selection-with-aliases
, ->query-string
and query-string-input
numbers and column names can be safely inlined into sql strings
And don't forget the pseudo columns' params.
May get quite complicated if pseudo columns are used as params of another pseudo columns (recur case)
better unit testing
new helper functions: process-conditions and process-query
Clojure(scirpt) can't alias
a namespace without requiring it
when it's not clear which column should be the subject and others are objects of an operator
eg: for this SQL
(?, ?) OVERLAPS (?, ?)
`table_1`.`start_column`, `table_1`.`end_column`, `table_2`.`start_column`, `table_2`.`end_column`
you can use the syntax
{:_ [:overlaps :table-1/start-column :table-1/end-column :table-2/start-column :table-2/end-column]}
When none is specified. But may expose too much?
Currently those keys are ignored
https://github.com/wilkerlucio/pathom/wiki/Placeholders
Current implementation only keep the last one. In case there is more than one condition, all of them should be kept
should have a key to provide that info
currently only current entity's columns are allowed in filters
There should be :join-filters
and :extra-join-filters
to provide constraints about join's properties.
{[(:person/all {:filters {:person/number [:> 0]}
:join-filters {:person/pets {:pet/yob [:> 1999]}}})]
[:person/name :person/yob]}
SELECT `person`.`name` AS `person/name`, `person`.`yob` AS `person/yob`
FROM `person`
WHERE
(`person`.`number` IN (SELECT `person_pet`.`person_number`
FROM `person_pet` JOIN `pet` ON `person_pet`.`pet_index` = `pet`.`index`
WHERE `pet`.`yob` > 1999))
AND
(`person`.`number` > 0)
should make use of #22
so conditions can describe relationship between a row's attributes
automatically attach reversed key to entities?
So that batching can happen to sub queries as well
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.