Skip to content

Commit

Permalink
Merge pull request #26 from alex268/develop
Browse files Browse the repository at this point in the history
Basic example for QueryService
  • Loading branch information
alex268 authored Mar 21, 2024
2 parents d302bea + 694521d commit f2c2b3a
Show file tree
Hide file tree
Showing 9 changed files with 749 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
<log4j.version>2.22.1</log4j.version>
<jcommander.version>1.82</jcommander.version>

<ydb.sdk.version>2.1.11</ydb.sdk.version>
<ydb.sdk.version>2.2.0-SNAPSHOT</ydb.sdk.version>
</properties>

<modules>
<module>auth</module>
<module>secondary_index</module>
<module>basic_example</module>
<module>query-example</module>
<module>ydb-cookbook</module>
<module>url-shortener-demo</module>
<module>jdbc</module>
Expand Down
88 changes: 88 additions & 0 deletions query-example/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>tech.ydb.examples</groupId>
<artifactId>ydb-sdk-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>

<artifactId>ydb-query-example</artifactId>
<name>YDB QueryClient basic example</name>
<description>Simple example of usage QueryClient of Java SDK for YDB</description>

<properties>
<junit5.version>5.10.1</junit5.version>
</properties>

<dependencies>
<dependency>
<groupId>tech.ydb</groupId>
<artifactId>ydb-sdk-query</artifactId>
</dependency>
<dependency>
<groupId>tech.ydb</groupId>
<artifactId>ydb-sdk-topic</artifactId>
</dependency>
<dependency>
<groupId>tech.ydb.auth</groupId>
<artifactId>yc-auth-provider</artifactId>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>

<dependency>
<groupId>tech.ydb.test</groupId>
<artifactId>ydb-junit5-support</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit5.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<finalName>ydb-basic-example</finalName>
<plugins>
<!-- copy dependencies to libs folder -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<!-- add libs folder to classpath -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>libs/</classpathPrefix>
<mainClass>tech.ydb.example.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<environmentVariables>
<YDB_DOCKER_IMAGE>cr.yandex/yc/yandex-docker-local-ydb:trunk</YDB_DOCKER_IMAGE>
<TESTCONTAINERS_REUSE_ENABLE>true</TESTCONTAINERS_REUSE_ENABLE>
<YDB_ANONYMOUS_CREDENTIALS>1</YDB_ANONYMOUS_CREDENTIALS>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit f2c2b3a

Please sign in to comment.