Comments (3)
Once we know which columns we're grabbing and what order we can make mapping 20% faster woo!
from sqldelight.
payments:
SELECT customer.*, payment.*
FROM ...
// generates:
interface Payments {
Customer customer();
Payment payment();
}
payments:
SELECT customer.*, payment.*, COUNT(something) AS something
FROM ...
// generates:
interface Payments {
Customer customer();
Payment payment();
long something()
}
payments:
SELECT customer.*, payment.*, something.date
FROM ...
// generates:
interface Payments {
Customer customer();
Payment payment();
Date date();
}
payments:
SELECT customer.*, payment.*, something.date AS created_date
FROM ...
// generates:
interface Payments {
Customer customer();
Payment payment();
Date created_date();
}
payments:
SELECT sender.*, recipient.*, payment.*
FROM customer AS sender
JOIN customer AS recipient ON ...
// generates:
interface Payments {
Customer sender();
Customer recipient();
Payment payment();
}
from sqldelight.
a thought - instead of having the implementing class creating new mapper, potentially having to repeatedly specify column adapters, there could be a single factory class they instantiate which has paymentsMapper() : Mapper<PaymentModel>
countMapper(): Mapper<Integer>
marshal(): Marshal<PaymentModel>
marshal(copy: PaymentModel): Marshal<PaymentModel>
etc. methods.
from sqldelight.
Related Issues (20)
- It fails to compile the interface for query that contains `levenshtein` function HOT 2
- How to complete migration in Compose Desktop HOT 3
- Support for `contentless_delete` option in FTS5
- java.lang.IllegalStateException in SqldelightParserUtil.kt:195
- java.lang.IllegalStateException in SqlDelightParserDefinition.kt:37
- Android driver support for `generateAsync`
- PostgreSql Dialect add USING BRIN/GIST to CREATE INDEX statement
- java.util.NoSuchElementException in UpsertClauseMixin.kt:47
- java.lang.Throwable in ProjectService.kt:215
- java.io.IOException in GeneratedVirtualFile.kt:54
- java.lang.Throwable in SqlDelightFindUsagesHandlerFactory.kt:37
- IntelliJ plugin breaks find usages on 2024.1 EAP HOT 4
- mysql INET_ATON/INET_NTOA support HOT 5
- The IFNULL function and COALESCE cause a compilation exception.
- java.lang.IllegalStateException in SqliteParserUtil.kt:70
- Expose database in AndroidSqliteDriver
- java.lang.NullPointerException (no error message) HOT 1
- Add PostgreSql TSVector Column type
- Hundreds of Recompositions Despite No Changes HOT 4
- Add support for pg RIGHT/FULL [OUTER] JOIN HOT 1
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.