Skip to content

Latest commit

 

History

History

spring-data-jdbc-ydb

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

YDB Spring Data JDBC Dialect

License Maven metadata URL CI

Overview

This project is an extension for Spring Data JDBC that provides support for working with YDB.

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
  • Access to a YDB Database instance

Installation

For Maven, add the following dependency to your pom.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):

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:

spring.datasource.driver-class-name=tech.ydb.jdbc.YdbDriver
spring.datasource.url=jdbc:ydb:grpc://localhost:2136/local

Java configuration for @YdbType annotation:

@Import(AbstractYdbJdbcConfiguration.class)
public class YdbJdbcConfiguration {}

An example of a simple Spring Data JDBC repository can be found at the following link.

Authorization

See connect to YDB.

Support and Contact

For support, you can open issues in the repository issue tracker with tag spring-data-jdbc.