pashagolub / pgxmock

pgx mock driver for golang to test database interactions
Other
393 stars 49 forks source link

Support for JSONB #43

Closed mynyml closed 2 years ago

mynyml commented 3 years ago

Is your feature request related to a problem? Please describe. I have a jsonb column that pgx supports out of the box. However there's no way I know of to tell pgxmock that a value in AddRow() is of type json/jsonb. I tried wrapping it with pgtype.JSONB without success (got panic: reflect.Set: value of type pgtype.JSONB is not assignable to type Config).

Describe the solution you'd like Built-in support for json/jsonb columns.

It might well be the case that there's already a known alternative for this, in which case the feature request would be to add it to the documentation for this project.

pashagolub commented 3 years ago

Hello.

Would you please show a little example of what we are trying to test?

Thanks in advance!

pashagolub commented 3 years ago

Maybe this example with time.Time arguments can give some hints to you?

pashagolub commented 2 years ago

📅 I'm closing this outdated issue.

♻️ If you think there is new information allowing us to address the issue, please reopen it and provide us with updated details.

🤝 Thanks in advance.