Git Product home page Git Product logo

Comments (7)

mehrdad-shokri avatar mehrdad-shokri commented on June 15, 2024

I found this, is it related?

from couchbase_lite.

bawelter avatar bawelter commented on June 15, 2024

I'm not sure on how everything is done behind the scenes but I do know that SQLite is used to store information and SQLite does not have boolean types instead it uses 0's and 1's.

from couchbase_lite.

mehrdad-shokri avatar mehrdad-shokri commented on June 15, 2024

So you're saying this is expected behavior? so why is there setBoolean on MutableDocument if it doesn't support boolean data type

from couchbase_lite.

bawelter avatar bawelter commented on June 15, 2024

I'm sure its mostly because there is not an easy solution to differentiate between boolean and int values in SQLite / maybe C or C# depending on where the value is being stored. Refer to this documentation on the method getBoolean for a way to parse the value https://pub.dev/documentation/couchbase_lite/latest/couchbase_lite/Document-class.html

from couchbase_lite.

mehrdad-shokri avatar mehrdad-shokri commented on June 15, 2024

@bawelter how do I cast a Result to Document? since QueryBuilder.execute() results ResultSet

from couchbase_lite.

bawelter avatar bawelter commented on June 15, 2024

@bawelter how do I cast a Result to Document? since QueryBuilder.execute() results ResultSet

Please reference the documentation https://pub.dev/documentation/couchbase_lite/latest/couchbase_lite/Database-class.html for retrieving a Document object and https://pub.dev/documentation/couchbase_lite/latest/couchbase_lite/Result-class.html for using the getBoolean function on a result set. Please refer to the documentation before posting questions here.

from couchbase_lite.

bawelter avatar bawelter commented on June 15, 2024

I use https://pub.dev/packages/built_value to model the data. Hopefully this helps.

from couchbase_lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.