[Question] how to insert literal sql fragment to query
See original GitHub issuehow does one express:
SELECT * FROM table WHERE timestamp > '-infinity';
or
INSERT INTO table (...., col1) VALUES (....) ON CONFLICT (id) DO UPDATE SET col1 = DEFAULT;
w/ peewee?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Statement Fragments · doobie - tpolecat
Composing SQL literals. You can construct a SQL Fragment using the fr interpolator, which behaves just like the sql interpolator. Fragments are concatenated ......
Read more >Type literal line feed in SQL string - Stack Overflow
INSERT INTO foo (bar) VALUES ('This is' + ' a line');. Is there a keyboard-shortcut to just ...
Read more >Syntax | ClickHouse Docs
The INSERT INTO t VALUES fragment is parsed by the full parser, and the data (1, 'Hello, world'), (2, 'abc'), (3, 'def') is...
Read more >SPARQL 1.1 Query Language - W3C
This section provides an informal introduction to SPARQL FILTER s; their semantics are defined in section 'Expressions and Testing Values' where ...
Read more >SQL Expression Language Tutorial (1.x API)
Version Check; Connecting; Define and Create Tables; Insert Expressions ... The other approaches it from the perspective of literal schema and SQL ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And yet your issue makes no mention of
AsIs
until we get down to the comments.Did you try
Value('-infinity')
?fails with
peewee.ProgrammingError: column "infinity" does not exist
because it doesn’t quote. and if you try to force the quotes it starts escaping them (which is fine btw)succeeds because it quotes.
the fact AsIs isn’t anywhere in the documentation lead to the issue being filed.