How to check value on a Postgres JsonB field?
@VanRoy ci sta già lavorando.
Dal 1/10/2020.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
I trying to check the values inserted on a table where a field is of the type jsonb.
When I run something like this:
assertThat(eventsTable)
.row(0)
.value("data").isEqualTo("{\"key\": \"value\"}");
I get the following error:
[Value at index 0 (column name : DATA) of Row at index 0 of events table]
Expecting:
<{"key": "value"}>
to be of type
<[TEXT, NUMBER, DATE, TIME, DATE_TIME, UUID]>
but was of type
<NOT_IDENTIFIED> (org.postgresql.util.PGobject)
Here is the table content:
[events table]
|-----------|---------|-------------------------------------------------------|
| | | |
| | PRIMARY | DATA |
| | KEY | (NOT_IDENTIFIED : class org.postgresql.util.PGobject) |
| | | Index : 0 |
|-----------|---------|-------------------------------------------------------|
| Index : 0 | | {"key": "value"} |
|-----------|---------|-------------------------------------------------------|
Using assertj-db 2.0.0
Is there any way I can check the content of a PostgreSQL jsonb column?
- Lingua principale
- Java
- Stelle
- 130
- Fork
- 21
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di assertj/assertj-db
-
Add toString() and equals() implementations for core domain types (Table, Row, Value, Column) Aperta
assertj/assertj-db#324 · 1 commento · 1 assegnatario ·
-
question
Difficoltà 3/5 1-2 giorni Idoneità per principianti 32/100
assertj/assertj-db#292 · 1 commento ·
-
row(index).column("ABC") and row().row().row().column("ABC") always referring to row 0 itself Apertaquestion
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
assertj/assertj-db#290 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
assertj/assertj-db#259 · 1 commento ·
-
Support R2DBC connection Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
assertj/assertj-db#206 ·
Tutte le issue di assertj/assertj-db
Issue simili
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/flink-agents#1152 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
objectionary/eo-graphs#75 ·