triniwiz / nativescript-plugins

Apache License 2.0
80 stars 50 forks source link

[Couchbase] TypeError: CBLQueryExpression.property(...).between is not a function #71

Open CatchABus opened 3 years ago

CatchABus commented 3 years ago

I'm using Couchbase plugin on android for some time now and had zero issues. I ran one of our apps on an Apple device for the first time and the following error occured: TypeError: CBLQueryExpression.property(...).between is not a function

I use latest version of plugin and my apple device runs os 13.5. I tried to log between function inside plugin sources and it returns undefined.

Additionally, after checking Couchbase lite docs, I found out this function is a pair with and. https://docs.couchbase.com/mobile/2.8.0/couchbase-lite-objc/Classes/CBLQueryExpression.html#/c:objc(cs)CBLQueryExpression(im)between:and:

triniwiz commented 3 years ago

I'll check that out

CatchABus commented 3 years ago

Any progress regarding this?

CatchABus commented 3 years ago

It seems plugin requires native code since native function between needs argument labels. Perhaps, a custom Objective-C function named betweenAnd with 2 arguments that calls between the native way would do the trick. Then call the custom function inside TypeScript.