-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Spring Data JDBC added README.md and run examples
- Loading branch information
1 parent
18865cc
commit e17cb0d
Showing
6 changed files
with
95 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Empty file.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## 0.9.1 ## | ||
|
||
- Supported VIEW INDEX statement from @ViewIndex | ||
- YdbDialect fully supports YQL | ||
- Supported specific @YdbType |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,75 @@ | ||
# YDB Spring Data JDBC Dialect | ||
|
||
[](https://github.com/ydb-platform/ydb-java-dialects/blob/main/LICENSE.md) | ||
[](https://mvnrepository.com/artifact/tech.ydb.dialects/spring-data-jdbc-ydb) | ||
[](https://github.com/ydb-platform/ydb-java-dialects/actions/workflows/ci-spring-data-jdbc-ydb.yaml) | ||
|
||
## Overview | ||
|
||
This project is an extension for Spring Data JDBC | ||
that provides support for working with [YDB](https://ydb.tech). | ||
|
||
### Features | ||
|
||
- Full support for basic operations with Spring Data JDBC | ||
- Supported VIEW INDEX statement from @ViewIndex annotation on method your Repository | ||
- @YdbType explicitly specifies the YDB data type (Json example in String type) | ||
|
||
## Getting Started | ||
|
||
### Requirements | ||
|
||
To use this Spring Data JDBC YDB Dialect, you'll need: | ||
|
||
- Java 17 or above. | ||
- Spring Data JDBC 3+ | ||
- [YDB JDBC Driver](https://github.com/ydb-platform/ydb-jdbc-driver) | ||
- Access to a YDB Database instance | ||
|
||
### Installation | ||
|
||
For Maven, add the following dependency to your pom.xml: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>tech.ydb.dialects</groupId> | ||
<artifactId>spring-data-jdbc-ydb</artifactId> | ||
<!-- Set actual version --> | ||
<version>${spring.data.jdbc.ydb.version}</version> | ||
</dependency> | ||
``` | ||
|
||
For Gradle, add the following to your build.gradle (or build.gradle.kts): | ||
|
||
```groovy | ||
dependencies { | ||
implementation 'tech.ydb.dialects:spring-data-jdbc-ydb:$version' // Set actual version | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
Use this custom dialect just like any other DBMS. | ||
|
||
## Configuration | ||
|
||
Configure Spring Data JDBC with YDB by updating your application.properties: | ||
|
||
```properties | ||
spring.datasource.driver-class-name=tech.ydb.jdbc.YdbDriver | ||
spring.datasource.url=jdbc:ydb:grpc://localhost:2136/local | ||
``` | ||
|
||
Java configuration for @YdbType annotation: | ||
|
||
```java | ||
@Import(AbstractYdbJdbcConfiguration.class) | ||
public class YdbJdbcConfiguration {} | ||
``` | ||
|
||
An example of a simple Spring Data JDBC repository can be found at the following | ||
[link](https://github.com/ydb-platform/ydb-java-examples/tree/master/jdbc/spring-data-jdbc). | ||
|
||
## Support and Contact | ||
|
||
For support, you can open issues in the repository issue tracker with tag `spring-data-jdbc`. |
This file contains 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