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
- Host: GitHub
- URL: https://github.com/linux-china/dbunit-pg-ext
- Owner: linux-china
- License: apache-2.0
- Created: 2025-03-25T02:19:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-06T06:18:45.000Z (6 months ago)
- Last Synced: 2026-02-08T23:47:55.432Z (4 months ago)
- Topics: dbunit, json, postgresql, vector
- Language: Java
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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