Comments (4)
- How to access to the snapshot with the solution?
change build config to https://cashapp.github.io/sqldelight/2.0.2/#snapshots using 2.1.0-SNAPSHOT
- Excuse me, my wrong, my type column it's
timestamptz
so, it's still working with DATE_TRUNC func.
Works with 2.1.0-SNAPSHOT
CREATE TABLE ProductUpdateDb(
issue_close_date_iso TIMESTAMPTZ
);
selectDistinctLocalDate:
SELECT DISTINCT DATE_TRUNC('month', issue_close_date_iso) AS local_date
FROM ProductUpdateDb
ORDER BY local_date DESC;
- This si the reason of why I currently casting the convertion to the Date type
I will create a PR to fix DATE_TRUNC
as it should allow the Date type
from sqldelight.
π€ There are two issues here, I think.
SELECT DISTINCT
was broken in 2.0.2 and is fixed in current snapshot #5172 - or go back to use version 2.0.0 forSELECT DISTINCT
- Using
DATE_TRUNC
withDATE
breaks and currently only works forTIMESTAMP_TIMEZONE, TIMESTAMP
types - this is incorrect the docs says that DATE is automatically cast https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC
So 2. needs an issue to fix this (unless you can use a TIMESTAMP)
from sqldelight.
π€ There are two issues here, I think.
SELECT DISTINCT
was broken in 2.0.2 and is fixed in current snapshot SELECT DISTINCT syntax no longer worksΒ #5172 - or go back to use version 2.0.0 forSELECT DISTINCT
- Using
DATE_TRUNC
withDATE
breaks and currently only works forTIMESTAMP_TIMEZONE, TIMESTAMP
types - this is incorrect the docs says that DATE is automatically cast https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-TRUNCSo 2. needs an issue to fix this (unless you can use a TIMESTAMP)
-
How to access to the snapshot with the solution?
-
Excuse me, my wrong, my type column it's
timestamptz
so, it's still working with DATE_TRUNC func. -
This si the reason of why I currently casting the convertion to the Date type
from sqldelight.
π€ I will try with the snapshot recommended, thank you so much for the quickly answers.
from sqldelight.
Related Issues (20)
- SQLite: return Long instead of data class in SUM HOT 2
- Add EXTRACT function to PostgreSql Dialect
- No plugin descriptor found at META-INF/maven/plugin.xml when running with Maven HOT 1
- java.lang.AssertionError in ProjectService.kt:83
- Can't delete HOT 1
- Cannot convert the provided notation to an object of type Dependency HOT 1
- Table not created on desktop without awaiting the result of Schema.create HOT 3
- java.lang.IllegalStateException in SqliteParserUtil.kt:114
- Unable to run `ALTER TABLE <> DROP CONSTRAINT <> RESTRICT;` when using postgresql HOT 2
- AndroidSqliteDriver fails to create single Table when not In-memory
- java.util.NoSuchElementException in UpsertClauseMixin.kt:47
- Keywords as column name - generated code missing double quotes for INSERT statement HOT 6
- java.lang.RuntimeException in SqlDelightFileViewProviderFactory.kt:76
- java.lang.Throwable in SqlDelightFileViewProviderFactory.kt:91
- Kotlin Multiplatform build fails on macOS HOT 4
- Changes in the database are not observed when using a context other than Dispatchers.Main
- K2 Support
- not able to create .sq file in kotlin multiplatfrom project
- Cannot use a simple migration statement HOT 1
- SQLDelight Plugin does not work with Android Studio Koala
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 sqldelight.