add remaining persistence shortcodes
[yosql.git] / yosql-website / content / persistence / _index.md
blob6e5e2c103dbfa009d0427def7ef042dbeb7bb957
1 ---
2 title: Persistence APIs
3 date: 2020-04-13
4 menu:
5   main:
6     weight: 140
7 ---
9 `YoSQL` supports multiple persistence APIs to interact with a database. We recommend that you pick the one that is already available in your project. In case you are starting fresh, `YoSQL` will default to the JDBC implementation because it requires no external dependencies and thus your project should be able to compile the generated code just fine. Some `YoSQL` tooling like the Maven plugin might auto-detect certain settings in your project to make your life easier, however you are always in full control and can change very aspect of the generated code.
11 Take a look at the available [configuration](/configuration/) options to adapt the generated code according to your needs. In order to monitor execution of your SQL statements, we recommend enabling one of the supported [logging](/logging/) APIs to add log output to the generated code. Read the [SQL](/sql/) section to learn how to write SQL statements in a `YoSQL`-enabled project.
13 - [EBean](./ebean/): The `Ebean` based implementation. It uses the constant `EBEAN` to identify itself. 
14 - [Fluent JDBC](./fluent-jdbc/): The `Fluent JDBC` based implementation. It uses the constant `FLUENT_JDBC` to identify itself.
15 - [JDBC](./jdbc/): The `JDBC` based implementation. It uses the constant `JDBC` to identify itself.
16 - [JDBI](./jdbi/): The `JDBI` based implementation. It uses the constant `JDBI` to identify itself.
17 - [jOOQ](./jooq/): The `jOOQ` based implementation. It uses the constant `JOOQ` to identify itself.
18 - [JPA](./jpa/): The `JPA` based implementation. It uses the constant `JPA` to identify itself.
19 - [MyBatis](./mybatis/): The `MyBatis` based implementation. It uses the constant `MYBATIS` to identify itself.
20 - [Pyranid](./pyranid/): The `Pyranid` based implementation. It uses the constant `PYRANID` to identify itself.
21 - [R2DBC](./r2dbc/): The `R2DBC` based implementation. It uses the constant `R2DBC` to identify itself.
22 - [SansOrm](./sansorm/): The `SansOrm` based implementation. It uses the constant `SANS_ORM` to identify itself.
23 - [Spring-Data JDBC](./spring-data-jdbc/): The `Spring-Data JDBC` based implementation. It uses the constant `SPRING_DATA_JDBC` to identify itself.
24 - [Spring-Data JPA](./spring-data-jpa/): The `Spring-Data JPA` based implementation. It uses the constant `SPRING_DATA_JPA` to identify itself.
25 - [Spring-Data R2DBC](./spring-data-r2dbc/): The `Spring-Data R2DBC` based implementation. It uses the constant `SPRING_DATA_R2DBC` to identify itself.
26 - [Spring JDBC](./spring-jdbc/): The `Spring JDBC` based implementation. It uses the constant `SPRING_JDBC` to identify itself.
27 - [Sql2o](./sql2o/): The `Sql2o` based implementation. It uses the constant `SQL2O` to identify itself.
28 - [Vert.x PG Client](./vertx-pg-client/): The `Vert.x PG Client` based implementation. It uses the constant `VERTX_PG_CLIENT` to identify itself.
30 ## Tooling
32 Replace `configValue` with the constant value for whatever persistence API you want to use in the generated code.
34 ### Maven
36 In order to use `YoSQL` together with [Maven](https://maven.apache.org/), take a look at the tooling [documentation
37 for Maven](/tooling/maven/).
39 {{< maven/persistence/index >}}
41 ### Gradle
43 In order to use `YoSQL` together with [Gradle](https://gradle.org/), take a look at the tooling [documentation for Gradle](/tooling/gradle/).
45 ```groovy
46 plugins {
47   id("wtf.metio.yosql")
50 yosql {
51   apis {
52     daoApi = configValue
53   }
55 ```
57 ### Bazel
59 In order to use `YoSQL` together with [Bazel](https://bazel.build/), take a look at the tooling [documentation for
60 Bazel](/tooling/bazel/).
62 ### CLI
64 In order to use YoSQL on the command line, take a look at the tooling [documentation for CLI](/tooling/cli/).
66 ```shell
67 $ yosql --apis-dao-api=configValue
68 ```
70 The shorter form is available as well:
72 ```shell
73 $ yosql --dao-api=configValue
74 ```