Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other database supports #37

Closed
jichon opened this issue Mar 10, 2018 · 11 comments
Closed

Other database supports #37

jichon opened this issue Mar 10, 2018 · 11 comments

Comments

@jichon
Copy link

jichon commented Mar 10, 2018

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

@myguidingstar
Copy link
Contributor

Thanks for reporting. There should be an option for which quote string to use. I'm working on it today. In the mean time can you give me an example of what that SELECT should look like for postgres to work in contrast to currently generated by walkable?

@myguidingstar
Copy link
Contributor

myguidingstar commented Mar 12, 2018

For instance how would you do this in postgres?

SELECT 2 AS `person/two`, `person`.`number` AS `person/number` FROM `person` WHERE `person`.`number` = 1 AND `person/two` = 2

@myguidingstar
Copy link
Contributor

Postgres doesn't allow using pseudo columns person/two in WHERE statements

@myguidingstar
Copy link
Contributor

Both SQLite and Postgres work with " quotes. We can switch to that by default

@myguidingstar
Copy link
Contributor

for UNION queries, SQLite requires SELECT * FROM (query-1) UNION SELECT * FROM (query-2) while postgres only works with query-1 UNION query-2

@myguidingstar
Copy link
Contributor

@jichon please check out latest master. I've tested with both mysql and postgresql

@myguidingstar
Copy link
Contributor

for sqlite, UNION needs some more work

@jichon
Copy link
Author

jichon commented Mar 12, 2018

@myguidingstar thank you for the update. i'll give that a shot

@myguidingstar
Copy link
Contributor

all done :)

@jichon
Copy link
Author

jichon commented Mar 13, 2018

@myguidingstar nice it's working after adding :quote-marks sqb/quotation-marks

@myguidingstar
Copy link
Contributor

you're welcome. I've created a new channel #walkable on clojurians slack. I'd love to hear more from people's use cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants