A new JDBC driver for PostgreSQL aimed at supporting the advanced features of JDBC and Postgres
Go to file
Kevin Wooten 3c59d5fb70
Add proper documentation (#371)
* Add proper documentation

* Adds `asciidoc` documentation
* `documentation` module added
  * Collects generated docs from all projects (e.g. settings.adoc from driver)
  * Generates HTML “User Guide” & “Release Notes” using `asciidoctor`.
  * Generated HTML docs pushed to `gh-pages`

* Add aggregated javadoc to gh-pages push

* Update release notes

* Point READMEs to Website and/or User Guide
2019-01-30 15:56:35 -07:00
.idea Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
.travis Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
buildSrc Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
config Switch to Gradle build (#369) 2019-01-25 13:20:30 -07:00
documentation Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
driver Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
gradle/wrapper Switch to Gradle build (#369) 2019-01-25 13:20:30 -07:00
settings-gen Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
shared/src/build Fix recursive failure when publishing 2019-01-25 15:57:27 -07:00
spy Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
udt-gen Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
.gitignore Switch to Gradle build (#369) 2019-01-25 13:20:30 -07:00
.travis.yml Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
LICENSE Add licenses headers 2013-10-05 21:28:03 -07:00
README.md Add proper documentation (#371) 2019-01-30 15:56:35 -07:00
SETTINGS.md Add back missing SETTINGS.md 2019-01-25 13:47:42 -07:00
build.gradle.kts Move all version information to buildSrc 2019-01-25 15:57:27 -07:00
gradlew Switch to Gradle build (#369) 2019-01-25 13:20:30 -07:00
gradlew.bat Switch to Gradle build (#369) 2019-01-25 13:20:30 -07:00
settings.gradle.kts Add proper documentation (#371) 2019-01-30 15:56:35 -07:00

README.md

General

A great place to start is the Website.

For comprehensive documentation see the User Guide

For quick reference, here are some useful details

Dependencies

Gradle
compile "com.impossibl.pgjdbc-ng:pgjdbc-ng:LATEST"
Maven
<dependency>
  <groupId>com.impossibl.pgjdb-ng</groupId>
  <artifactId>pgjdb-ng</artifactId>
  <version>LATEST</version>
</dependency>

JDBC URL

The driver accepts basic URLs in the following format

jdbc:pgsql://localhost:5432/db

See the User Guide for complete details on the accepted URL syntax.

Data sources

The javax.sql.DataSource class is

com.impossibl.postgres.jdbc.PGDataSource

, the javax.sql.ConnectionPoolDataSource class is

com.impossibl.postgres.jdbc.PGConnectionPoolDataSource

and the XADataSource class is

com.impossibl.postgres.jdbc.xa.PGXADataSource

License

pgjdbc-ng is released under the 3 clause BSD license.

Building

The driver is built with Gradle. To build & test, execute:

./gradlew clean build.

This will produce, in the driver/build/libs directory, two JAR files. One with dependencies packaged inside (pgjdbg-nc-<VERSION>-all) and another without (pgjdbc-ng-VERSION).

NOTE: Building requires a working install of Docker and Docker Compose as the unit tests are executed against a PostgreSQL instance in a private test container that is automatically started. If you wish to execute the tests against a specific instance of PostgreSQL outside of Docker see Testing.

Alternatively, to build the driver without testing you can execute:

./gradlew clean assemble  

Testing

The unit tests need a PostgreSQL database to execute against. The build will start a Docker container and setup the test environment to execute against that container automatically.

If you don't have Docker installed or, wish to execute the tests against a specific instance of PostgreSQL, you can execute the build or test tasks with the noDocker property set to true. For example:

./gradle -PnoDocker=true test

For this to work the unit tests need to locate your selected PostgreSQL instance. The unit tests attempt a connection assuming theses defaults:

SERVER:     localhost
PORT:       5432
DATABASE:   test
USERNAME:   test
PASSWORD:   test

The following system properties are supported in order to customize the setup

pgjdbc.test.server
pgjdbc.test.port
pgjdbc.test.db
pgjdbc.test.user
pgjdbc.test.password