Coder Social home page Coder Social logo

Comments (4)

NathanaelA avatar NathanaelA commented on June 5, 2024 1

Hi Thanks for all the AWESOME feedback. :-)

const Sqlite = require( "@proplugins/nativescript-sqlite" );

This is a mistake; I was going to move sqlite to @proplugins namespace, and even had it fully working under that namespace, but then just before I moved it, I realized that it could break a lot of clients. So I reverted all those changes. Looking at the docs, it looks like I missed that one, I'll get that fixed. 😀

import {Sqlite} from "@proplugins/nativescript-sqlite";

Good catch, I totally glossed over that one.

const dbPromise = new Sqlite("MyTable");
const db = await dbPromise;

You can actually do, without the new: ;-)
const db = await Sqlite("MyTable");

I updated the docs. 😀

  1. Also the official example

This was more for simplicity that I joined the two examples; but I can see your point so I turned it into two separate code snippets. 😀

  1. Version, under a callback, it does return a number. However, looking at the code path I believe you are correct under a promise it will return the value array... Good catch, I've never noticed that discrepancy...

It will be fixed in the next version to be a number under both path's.

from nativescript-sqlite.

emirotin avatar emirotin commented on June 5, 2024

JFYI I've checked it and the version is fixed indeed in 2.6.2.

const db = await Sqlite(dbName);
doesn't work though while
const db = await new Sqlite(dbName);
works fine (yet looks weird 😄)

from nativescript-sqlite.

NathanaelA avatar NathanaelA commented on June 5, 2024

Weird, the await sqlite should be working ; I'll run a test... :)

Nathanael A.

from nativescript-sqlite.

NathanaelA avatar NathanaelA commented on June 5, 2024

Should be working fine in 2.6.3, had a silly if order precedence bug...

from nativescript-sqlite.

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.