Comments (2)
I think these are probably the next steps:
- Iterate on grammar-kit-composer to support adding tokens and clean up the process of overriding rules
- Figure out how to dynamically change the SQLDelight IntelliJ plugin's classpath (we'll need to do this for the IDE to understand dialects, since you'll specify the dialect in gradle and then the intellij plugin will somehow need to load that dialect into its classpath)
- Create a new branch on sqldelight which tracks the sql-psi snapshot where we start working on pruning out the dialect stuff in sqldelight. We could probably just use sql-psi-dev for this.
- I like this because it still enables other contributions to sqldelight master, and a potential 1.5.1 release if there are issues we need to fix.
- We should start building the dialects in
sqldelight
so its easier to make changes both to sqldelight's compiler/runtime and the dialect and test them in tandem. Later on if we wanted to move them out (like if you want to host the postgres dialect veyndan) we can do that
i think since postgres is the dialect that has a bunch of bugs blocked by this we start with that so we can make sure we're moving in the right direction. I think we start by creating some new modules:
sqldelight
--drivers
----jdbc-driver
----postgres-driver (*new*)
--dialects (*new*)
----postgres-dialect (*new*)
--sqldelight-compiler
--sqldelight-gradle-plugin
--sqldelight-idea-plugin
and copy/paste the existing postgres
folder from sql-psi into that module. I assume a bunch of things will go red about stuff being internal - we should just make all those things public and then we can target the snapshot build. Then from there we can start pulling the postgres-specific code in sqldelight-compiler
into the postgres dialect.
I think using the gradle testkit integration tests in sqldelight-gradle-plugin
would be a major pain in the ass, so I think we write integration tests by using composite builds:
sqldelight
--dialects
----postgres-dialect
------integration-tests
--------build.gradle
--------settings.gradle
in dialects/postgres-dialect/integration-tests/build.gradle
buildscript {
dependencies {
classpath "com.squareup.sqldelight:gradle-plugin"
}
}
apply plugin: "com.squareup.sqldelight"
sqldelight {
Database {
dialect "com.squareup.sqldelight:postgres-dialect"
}
}
in dialects/postgres-dialect/integration-tests/settings.gradle
includeBuild("../../../") {
dependencySubstitution {
substitute module("com.squareup.sqldelight:gradle-plugin") with project(":sqldelight-gradle-plugin")
substitute module("com.squareup.sqldelight:postgres-dialect") with project(":dialects:postgres-dialect")
}
}
I'm pretty confident in that approach making it the easiest to work on sqldelight 2.0, but I am less confident about the grammar/ide stuff - so those are going to be my initial focus once I switch back on to working on sqldelight.
from sql-psi.
The postgres-dialect will need to have a codegen component to it that ensures that all references to SqlDriver
in the generated code are instead PostgreSqlJdbcDriver
, and then we can start adding all the APIs to that driver (like getBoolean
) and use them in the generated code.
from sql-psi.
Related Issues (20)
- No snapshots published
- Retrieving day of week value from date HOT 1
- Support the Information Schema
- Fix 2022.2 compability HOT 2
- Using 0.5.0-SNAPSHOT with Sqldelight fails with migrations referencing tables from other files HOT 1
- [Postgres] network address types inet cidr macaddr
- Duplicate class failure with Timber HOT 3
- HAVING Statement does not compile without GROUP BY
- Test fixture failure prevents override of Mixin HOT 1
- Support create type statement in core grammer
- Test fixtures aren't not valid ansi sql
- Delete statements with a limit throws a compiler error HOT 1
- CTEs auxiliary insert with select statements cannot reference each other HOT 1
- Sqlite and PostreSql - INSERT INTO ... SELECT ... RETURNING * fails to compile
- Checking if list is null leads to compile error
- False positive Multiple columns found with name coachTagId
- Add info about which signing keys will be used for published artifacts.
- Insert Statement exposes its columns in the SELECT query
- No sql-psi core 0.4.10
- Improve tableAlias and qualified column resolving
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 sql-psi.