Git Product home page Git Product logo

websql-promisified's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gothbork krackers

websql-promisified's Issues

Results array order.

That's what actually happens with the example from README:

capture

It says that

The results array returned from transaction() is filled in the same order your queries execute.

and for me it never works. First it executes all "root" statements, and then in chained statements it lose expected order. Is that ever possible to fix it?

help please

can i use it in angular 2 ...when i'm try do this and import
import websql from 'websql-promisified'; it..give me red line under websql-promisified . ???

Results are combined across multiple transaction calls

I would expect the promise returned by transaction to only return Web SQL results that originated in that transaction - however - If I call two transactions in close succession the 2nd transaction promise includes the transaction from the first.

Not sure if this is intended or a bug, but it makes it difficult to have unrelated code that shares a database - Any suggestions?

Example:

var openDatabase = require('websql');
var webSqlPromise = require('websql-promisified').default;
var db = webSqlPromise(openDatabase('test-db', "1.0", "Test Database", 50000));

db.transaction(function(tx) {
  tx.executeSql('select "hello" as greeting'); 
})
.then(function(results) {
  console.log('first transaction results');
  console.log(results);
  // returns first transaction result
});

db.transaction(function(tx) {
  tx.executeSql('CREATE TABLE IF NOT EXISTS Person (name TEXT, age Integer)');
})
.then(function(results) {
  console.log('second transaction results');
  console.log(results);
  //return first AND second transaction result
});

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.