This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.jooq.codegen.GenerationTool | |
| import org.jooq.meta.jaxb.* | |
| import org.jooq.meta.* | |
| // These can also go into gradle.properties | |
| def packageName = "my.package" | |
| def postgresDriverVersion = "42.1.4" | |
| def jooqVersion = "3.11.1" | |
| def debugDatabaseHost="localhost" | |
| def debugDatabasePort=5432 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jooq.fetchOne("select * from film limit 1"); | |
| // type safety for fields | |
| jooq.fetchOne("select * from film limit 1").get(FILM.TITLE); | |
| jooq.fetchOne("select title || ' ' || description from film limit 1").get(0, String.class); | |
| // parameters | |
| jooq | |
| .fetchOne("select title || ' ' || description from film where title like ? limit 1", "DINOSAUR%") | |
| .get(0, String.class); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select( | |
| DIRECTOR.NAME.as(PERSON.NAME), | |
| DIRECTOR.ADDRESS.as(PERSON.ADDRESS) | |
| ) | |
| .from(DIRECTOR) | |
| .union( | |
| select( | |
| ACTOR.NAME.as(PERSON.NAME), | |
| castNull(PERSON.ADDRESS).as(PERSON.ADDRESS) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defaultTasks 'jooqModel' | |
| buildscript { | |
| repositories { | |
| jcenter() | |
| } | |
| dependencies { | |
| classpath "org.postgresql:postgresql:42.1.4" | |
| classpath "org.jooq:jooq-meta:3.13.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.jooq.codegen.GenerationTool | |
| // To include into main Gradle file, use: apply(from = "jooq.gradle.kts") | |
| val dbHost: String by project | |
| val dbPort: String by project | |
| val dbName: String by project | |
| val dbUser: String by project | |
| val dbPass: String by project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.0 | |
| info: | |
| version: 1.0.0 | |
| title: Smart City Bikes station protocol | |
| paths: {} | |
| # No specific paths - one of the events below is either sent via MQTT or pushed via TCP to an IP & port | |
| components: | |
| schemas: | |
| GenericEvent: | |
| description: Common properties present in all station events (see individual subtypes) |
OlderNewer