An open API service indexing awesome lists of open source software.

https://github.com/linux-china/dbunit-pg-ext

DBUnit PostgreSQL Extension: add json, jsonb and vector data types support
https://github.com/linux-china/dbunit-pg-ext

dbunit json postgresql vector

Last synced: about 1 month ago
JSON representation

DBUnit PostgreSQL Extension: add json, jsonb and vector data types support

Awesome Lists containing this project

README

          

DBUnit PostgreSQL Extension
=============================

dbunit-pg-ext is an extension for DBUnit to add more features for PostgreSQL.

Data types of `PostgresqlDataTypeFactory`:

- `uuid`
- `interval`
- `inet`
- `geometry`
- `citext`

Data types of `PostgresqlExtraDataTypeFactory`:

- `json` and `jsonb`
- `XML`
- `vector`: https://github.com/pgvector/pgvector
- `money`
- `_text`: array of text
- range: `int4range`, `int8range`, `numrange`, `tsrange`, `tstzrange`, `daterange`
- `hstore`: key-value pairs
- `ltree`: tree-like structure

Extra classes:

- `PostgresqlExtraDataTypeFactory`: extend `PostgresqlDataTypeFactory` and more data types for PostgreSQL
- `PgConnection`: DBUnit `IDatabaseConnection` with `PostgresqlExtraDataTypeFactory`

# Get Started

Add dependency in pom.xml:

```xml

org.mvnsearch
dbunit-pg-ext
0.1.3

````

# dbunit-maven-plugin configuration

```xml

org.dbunit
dbunit-maven-plugin
1.2.0


org.postgresql
postgresql
42.7.5


org.mvnsearch
dbunit-pg-ext
0.1.3




org.mvnsearch.dbunit.ext.postgresql.PostgresqlExtraDataTypeFactory

```

# References

* PostgreSQL Data Types: https://www.postgresql.org/docs/current/datatype.html
* DBUnit: https://www.dbunit.org/howto.html
* DbUnit and JSON column type support: https://stackoverflow.com/questions/52845001/dbunit-and-json-column-type-support
* DbUnit Extractor: https://plugins.jetbrains.com/plugin/7958-dbunit-extractor