Comments (4)
Thanks for the report, I've released version 0.35.1 of sqlparser
to fix this.
from drift.
Oh nice, I didn't know that was a thing! This will be allowed with the next release.
from drift.
Neither did I: I found out by accident, but it's pretty useful. Thank you for the quick turnaround on this one!
It only works if there's only a single column in the CTE, from what I understand.
As in, this works:
WITH names AS (
SELECT name FROM persons
)
SELECT
*,
'John' IN names AS john_exists
FROM my_table
Whereas this does not:
WITH names AS (
SELECT name, surname FROM persons
)
SELECT
*,
'John' IN names AS john_exists
FROM my_table
But from what I understand looking at your commit, you do include such a column comparison already, so it should all be good :)
from drift.
@simolus3 hey, unfortunately this does not work properly in the 2.17 release. The column name in the generated data class is incorrect (the data contained therein is fine, though)
It looks like it gets resolved to the textual content of the whole line, i.e. johninnamesASjohnExists
, instead of just everything after AS
, i.e. johnExists
.
from drift.
Related Issues (20)
- database is locked error with WAL journal mode HOT 4
- Option to run a few queries sequentially HOT 3
- Code generation creates database table with wrong type HOT 9
- Drift generator doesn't strip custom row class from SQL HOT 1
- Primary Key not required in companion insert HOT 2
- Issue with generated code: database.g.dart file HOT 29
- Select int64 return type HOT 4
- Start a select with the Dart API without specifiying a table HOT 4
- Custom query generated type missing nullables HOT 4
- [WEB] DriftRemoteException: RangeError (start): Invalid value: Not in inclusive range 0..2322399232: -1972640192 HOT 1
- createdAt & updatedAt columns HOT 4
- SqliteException(5): while selecting from statement, database is locked, database is locked (code 5) HOT 2
- drift files: file formatting impossible
- How to initialize the database without the constructor syntax HOT 2
- Add toJson() for result class HOT 1
- Query stream cancellations can affect migrations
- No modification allowed Error HOT 4
- Schema migration helper fails when there are no migrations yet HOT 1
- Views code generation HOT 9
- Cannot test migrations using modular approach with store_date_time_values_as_text: true HOT 4
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 drift.