Comments (3)
@hlship In MySQL, I'd expect DATE_SUB( NOW(), INTERVAL ? SECONDS )
so I was curious about the quote in the PostgreSQL version: can you write now() - interval '? seconds'
and still have a parameter there?
(I'm considering a new reader literal that is halfway between raw
and regular constructed SQL so parameters would work -- but I'm not sure how parameter lifting would work if you have them inside SQL strings)
from honeysql.
I think this might be partly addressed by #219 because once that's done you should be able to write:
[:< :expired_at (raw ["now() - interval '" seconds " seconds'"])]
from honeysql.
This has been implemented as part of #219 and the README now includes this particular example.
I'm not convinced that named abstractions/functions should be supported in the DSL (yet) so I'm going to close this out. Feel free to add comments to #219 for other use cases that are not yet supported by this.
from honeysql.
Related Issues (20)
- Update docs for single keyword (symbol) uses? HOT 1
- Syntax for expanding records in PostgreSQL HOT 6
- :raw expects a single argument now HOT 1
- Improve exceptions/error reports HOT 2
- Postgres: On conflict update row with values where condition is met reports an error HOT 8
- HoneySQL2 makes all functions calls uppercase HOT 3
- Difficulties in converting documentation examples from hashmap form to helper function form HOT 5
- Postgres upsert support docs miss some of the supported cases
- `format` can emit syntactically invalid AS clauses HOT 1
- Nesting JOINs HOT 11
- Support H2's `TRUNCATE TABLE` syntax HOT 1
- Support for `postgres` "with ordinality" HOT 1
- Support for PostgreSQL interval type
- `:quoted` doesn't work together with `if exists` HOT 2
- Improve docs for UPDATE
- Does honeysql support pg's json path? HOT 4
- Use of VALUES with WITH should clarify it must be vector-of-vectors form
- ON CONFLICT should support expressions, not just entities
- formatf for positional parameter convenience? HOT 1
- Support `OVERRIDING SYSTEM VALUE` for inserts HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honeysql.