OP-Engineering/op-sqlite

Null value return 0 Instead Null

Closed this issue · 9 comments

DB Table Value
image

Select Query Result
image

Did this bug ? Null will replaced into 0 ?
If I want to get null value instead 0 ?

Packages :

"@op-engineering/op-sqlcipher": "^1.0.15",
"react": "18.2.0",
"react-native": "0.72.6",

Looks correct to me. You should try to create a minimal reproducible example

Oscar Franco Screen 000519

Still giving me the same result. newest release package give me error openssl-config.cmake when using sqlcipher

image

Below is the result when using @op-engineering/op-sqlite: 2.0.7
image

Step to Reproduce:

  1. Download DB from remote server, then Copy downloaded DB into Android DB Location
  2. Open DB, and run query "SELECT * FROM t_Users" using executeasync to get result

Expected Result:

  • Column Useremail and BlockedAt must return null value, instead giving 0 value

If you are having an issue with op-sqlcipher, create an issue in the op-sqlcipher repo. Also, create a reproducible example, I already tried to reproduce it and found no issues, don't have time to create a project from scratch and find the cause.

Hi @shiroze.
I got this error too, with async methods, on android.
I've sent a PR and i'm waiting for review now. If it gets accepted, could you check your use case again?

Hi @shiroze. I got this error too, with async methods, on android. I've sent a PR and i'm waiting for review now. If it gets accepted, could you check your use case again?

I ran into the same issue without using op-sqlcipher. I ended up just reverting back to the old repo for now. I can test the PR as well.

Hi @shiroze. I got this error too, with async methods, on android. I've sent a PR and i'm waiting for review now. If it gets accepted, could you check your use case again?

I ran into the same issue without using op-sqlcipher. I ended up just reverting back to the old repo for now. I can test the PR as well.

Nice, this is the PR:
#48

The null fix is among others small fixes.

Sorry, I've been traveling the last days. Will take a look soon

Hi @shiroze!
Did you had the time to test this problem with the 2.0.18 release?

Hi @shiroze! Did you had the time to test this problem with the 2.0.18 release?

Sorry for late reply and yes, already tested and it give me the result I want.

thank you