GithubHelp home page GithubHelp logo

cordova_sqliteplugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cordova_sqliteplugin's Issues

Cannot create a CDVSQLitePlugin instance without a dbPath

I got this problem.

[Session started at 2012-03-25 19:00:01 +1100.]
2012-03-25 19:00:04.833 SQLitePluginTestProject[24089:207] WARNING: Splash-screen image 'Default-Portrait' was not found. Orientation: 1, iPad: 1
2012-03-25 19:00:05.071 SQLitePluginTestProject[24089:207] Device initialization: DeviceInfo = {"name":"iPad Simulator","uuid":"00000000-0000-1000-8000-000000000000","platform":"iPad Simulator","gap":"1.5.0","version":"4.3","connection":{"type":"wifi"}};
2012-03-25 19:00:05.106 SQLitePluginTestProject[24089:207] [INFO] Failed to run constructor: Object:
message = Cannot create a CDVSQLitePlugin instance without a dbPath
line = 36
expressionBeginOffset = 798
expressionEndOffset = 874
sourceId = 97196528
sourceURL = file:///var/root/Library/Application%20Support/iPhone%20Simulator/4.3/Applications/C726BAF0-8DF9-4514-8B89-F696B5821124/SQLitePluginTestProject.app/www/cdvsqlite_plugin.js

I place this in my index.html for checking.

function createDB() {

var db;
db = new PGSQLitePlugin("my_sqlite_database.sqlite3");

 db.executeSql('DROP TABLE IF EXISTS test_table');
db.executeSql('CREATE TABLE IF NOT EXISTS test_table (id integer primary key, data text, data_num integer)');
db.transaction(function(tx) {
  return tx.executeSql(["INSERT INTO test_table (data, data_num) VALUES (?,?)", "test", 100], function(res) {
    console.log("insertId: " + res.insertId + " -- probably 1");
    console.log("rowsAffected: " + res.rowsAffected + " -- should be 1");
    return db.executeSql("select count(id) as cnt from test_table;", function(res) {
      console.log("rows.length: " + res.rows.length + " -- should be 1");
      return console.log("rows[0].cnt: " + res.rows[0].cnt + " -- should be 1");
    });
  }, function(e) {
    return console.log("ERROR: " + e.message);
  });
});

}

</script>

Hey, it's PhoneGap!

Don't know how to get started? Check out PhoneGap Start

  1. Check your console log for any white-list rejection errors.
  2. Add your allowed hosts in PhoneGap.plist/ExternalHosts (wildcards OK, don't enter the URL scheme)
    <input type="button" onclick="createDB();" value="Test SQLite DB">

How to open existing .sqlite3 files

So I've got this plugin working and opening/creating databases. Now I would like to be able to package my app with a .sqlite3 file and open this existing file with this plugin. Your doc says that all dbs are stored in the Documents folder but it looks like any files that are packaged with the app are loaded into the Resources directory. Any suggestions?

Thanks for the wonderful plugin!

Error with Cordova 1.7.0

When I try to open a database I get this: 2012-05-23 22:43:52.955 CMEOfflineTilePOC[17544:13403] -[AppDelegate getCommandInstance:]: unrecognized selector sent to instance 0x7e65850
2012-05-23 22:43:52.956 CMEOfflineTilePOC[17544:13403] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: -[AppDelegate getCommandInstance:]: unrecognized selector sent to instance 0x7e65850

Any plans to update for 1.7.0?

Can't find variable: SQLitePlugin in Cordova 1.6.1

[Switching to process 2006 thread 0x2203]
2012-04-26 14:19:01.372 Cordova_SQLitePlugin_161[2006:207] [INFO] Error in success callback: NetworkStatus0 = ReferenceError: Can't find variable: SQLitePlugin

Yes, I added SQLitePlugin in the plugin.

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.