Code Monkey home page Code Monkey logo

cql-java-driver's Introduction

CovenantSQL-Java-Connector

CovenantSQL-Java-Connector is a Type 4 Java JDBC driver for CovenantSQL database querying.

Adding CovenantSQL-Java-Connector to your build

To add a dependency using Maven, use the following:

        <dependency>
            <groupId>io.covenantsql</groupId>
            <artifactId>cql-java-connector</artifactId>
            <version>1.0.1</version>
        </dependency>

To add a dependency using Gradle:

repositories {
    maven {
      url 'https://raw.github.com/CovenantSQL/cql-java-driver/mvn-repo'
    }
}

dependencies {
  compile 'io.covenantsql:covenantsql-java-connector:1.0-SNAPSHOT'
}

Use CovenantSQL-Java-Connector with MyBatis

Configure the dataSource like the following example:

<dataSource type="POOLED">
  <property name="driver" value="io.covenantsql.connector.CovenantDriver"/>
  <property name="url" value="jdbc:covenantsql://${host}:${port}/${database}"/>
  <property name="driver.key_path" value="${key_path}"/>
  <property name="driver.cert_path" value="${cert_path}"/>
  <property name="driver.sslmode" value="${sslmode}"/>
  <property name="driver.ssl" value="${ssl}"/>
</dataSource>

Explanation:

  1. Use io.covenantsql.connector.CovenantDriver as the driver class.
  2. Replace host variable with the adapter host address.
  3. Replace port variable with the adapter port.
  4. Replace database variable with the adapter.
  5. Replace key_path variable with the https certificate private key path.
  6. Replace cert_path variable with the https certificate file path.
  7. Replace sslmode variable to use none/strict mode for https certificate check.
  8. Set ssl variable to true/false to enable/disable https adapter connection.

You can see a runnable example Here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.