Code Monkey home page Code Monkey logo

pouchdb-adapter-cordova-sqlite's People

Contributors

greenkeeperio-bot avatar ibrahimawadhamid avatar luiskcs89 avatar nolanlawson avatar npmcdn-to-unpkg-bot avatar paolosanchi avatar vermi0ffh avatar yurimorini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pouchdb-adapter-cordova-sqlite's Issues

Probably a dumb question, sorry!!

Hi,

When declaring a new PouchDB instance with the cordova-sqlite adapter installed...

How does the coding differ than if you weren't using the adapter... I don't understand what the adapter is for, is it to override the default?

Again, sorry for the basic question.

Cheers

db.post() error

Hi!
I'm trying to post a document to my db using this adapter.
When doing so, I get the following error:

pouchdbUtils.uuid(32, 16).toLowerCase is not a function pouchdb
My code is really simple:
` PouchDB.plugin(cordovaSqlitePlugin);

  this.addressLocalDB = new PouchDB('addresses.db', {adapter: 'cordova-sqlite'});
  this.addressLocalDB.post({}).then((res) => console.log (res)).catch ((err) => console.log (err));`

I'm waiting for the device ready callback and following all the instructions.

Pouch throw an error WebSqlPouchCore.call is not a function

When I try to instantiate the plugin, Pouch throw an error WebSqlPouchCore.call is not a function. Seems that the very first line of the inclusion require a module:

var WebSqlPouchCore = require('pouchdb-adapter-websql-core')

The above module export an object with its default property ad the needed function cause Pouch db uses ES6 modules and this plugin uses require.

So the above line needs to be modified as:

var WebSqlPouchCore = require('pouchdb-adapter-websql-core').default

Can't get pouchDB to use SQLlite plugin in Cordova App.

I keep seeing this error in my pouchdb-hellow-world barebones installation when testing in the phonegap developer app on my ios 9.3 , iphone 6s:

{"status":500,"name":"web_sql_went_bad","message":"unknown","reason":"SecurityError: DOM Exception 18"}

this is all i have in my onDeviceReady function right now


onDeviceReady: function() {
        var db      = new PouchDB("pouch.db");                         
        var websql  = new PouchDB("websqlpouch.db",{adapter: "websql"}); 
        var sqllite = new PouchDB("sqllitepouch.db",{adapter: "cordova-sqlite"); 
 
        if(db.adapter){
            $("#anypouch").text("PouchDB is working! Using adapter = " + db.adapter);
        }else{
            $("#anypouch").text("PouchDB nope!");
        }

        if(websql.adapter){
            $("#websql").text("webSQL is working! Using adapter = " + websql.adapter);
        }else{
            $("#websql").text("webSQL nope!")
        }

        sqllite.post({}).then(function (res) {
          return sqllite.get(res.id);
        }).then(function (doc) {
          alert('stored a document! ' + JSON.stringify(doc));
          alert('adapter is: ' + sqllite.adapter);
        }).catch(
            console.log.bind(console)
        );

        // if(sqllite.adapter){
        //     $("#sqllite").text("✓ SQLite plugin is working.");
        //     console.log("SQLitE Plugin OK" + sqllite.adapter);
        // }else{
        //     console.log("SQLitE Plugin nope")
        // }
    }

this is all i have in my index.html:


<body>
        <blockquote>
            <h3>He Needs His Mama</h3>
            <div id="anypouch">&#10007; PouchDB is not working.</div>
            <div id="websql">&#10007;  WebSQL is not supported.</div>
            <div id="sqllite">&#10007; SQLLite plugin is not supported.</div>
        </blockquote>
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js"></script>             
        <script type="text/javascript" src="js/pouchdb-6.1.1.min.js"></script>
        <script type="text/javascript" src="js/pouchdb.cordova-sqlite.js"></script>

        <script type="text/javascript" src="js/index.js"></script>

    </body>

and here is what i have in my cordova plugins:


cordova plugins
cordova-plugin-sqlite-2 1.0.4 "SQLitePlugin"
cordova-plugin-websql 0.0.10 "Web SQL plugin"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-sqlite-storage 1.5.2 "Cordova sqlite storage plugin"


ive been googling for days and have hit a wall. Any help would be appreciated.

i keep seeing the error with my actual app, which is why tried this barebones install to see if i can isolate it. I only have the sql lite plugins + the sqllite adapter code. it make me wonder if i ever had the sqllite plugin working at all.

also no matter how many plugins i install via the CLI

i still see this

 PouchDB error: you must install a SQLite plugin in order for PouchDB to work on this platform. Options:
 - https://github.com/nolanlawson/cordova-plugin-sqlite-2
 - https://github.com/litehelpers/Cordova-sqlite-storage
 - https://github.com/Microsoft/cordova-plugin-websql

Not able to get any of the 3 possible adapters working

Hi there, I have a problem that I haven't been able to resolve

My ionic app currently works with standard idb adapter ( new PouchDB('db')), however sometimes it stops working because of quota exceeded exceptions. This is the reason I'm looking into these other adapters.

I've installed the demo from https://github.com/nolanlawson/pouchdb-adapter-cordova-sqlite-demo
and running it on android (which is the only target platform). I've done the following tests:

Test 1 :no plugin installed:
-demo says PouchDB error: you must install a SQLite plugin in order for PouchDB to work on this platform."
-the demo does correctly run, would it then be reverting to to another adapter type behind the scenes?
-db.adapter prints out 'cordova-sqlite'
-I've added db.info() into the demo code which then returns result.adapter ='websql' ... is this a bug? I assume websql is the real adapter in this case

Test 2: cordova-plugin-sqlite-2 :
-demo works with no errors
-db.adapter prints out 'cordova-sqlite'
-db.info() -> result.adapter returns 'websql'
-when I use it in my own app it's not working and when I print out the adapter (from db.info().then) it says "websql".
-I have a PouchDB.replicate and PouchDB.sync in my code, do these need to be passed with the adapter too?
-I've seen recommendations for not using this plugin for android so I guess I should not be using this anyway

Test 3: cordova-plugin-websql:
-both demo and my own app say "PouchDB error: you must install a SQLite plugin in order for PouchDB to work on this platform."
-The demo does work though,
-db.adapter prints out 'cordova-sqlite'-
-db.info() -> result.adapter returns 'websql'

Test 4: cordova-sqlite-storage: demo says ""WebSQL threw an error", demo not working

I've tried the demo as it was downloaded but also by replacing the pouchdb.js with the latest pouchdb-6.1.2.min.js and latest pouchdb.cordova-sqlite.js

any ideas?

Cannot reopen database with same name after database file deleted

My app has need to remove database files to free up space when no longer needed. (As db.destroy() does not free any space). It might be that this database is never needed again so removing the file is the best method for my app. However if I try to reopen a database with the same name PouchDB fails with

"WebSQL threw an error – Error: database not open β€” SQLitePlugin.js:25"

Seems like pouchdb may keep some reference to the file after being opened once?

(I could live with using Vacuum as that is supposed to truncate the file. But I can find no example of how you could actually run that command under cordova-sql-lite)

Below is a sample script that reproduce the problem.

cordova-sqlite-storage 2.0.1
"pouchdb": "6.1.2",
"pouchdb-adapter-cordova-sqlite": "2.0.2",

This is with IOS 10,

var options = {
            adapter: 'cordova-sqlite', 
            iosDatabaseLocation: 'Documents',
        };
        var name = 'TESTDB';
        var db = new PouchDB(name, options); 
        setTimeout(function() {
            console.log("Now closing",db);
            db.close(function() {
                db.destroy(function() {
                    setTimeout(function() {
                        console.log("now delete file ");
                        SQLite.deleteDatabase({name:name,iosDatabaseLocation: 'Documents'}).then( () => {
                            console.log("database file delete");
                            setTimeout(function() {
                                console.log("now reopen");
                                var db2 = new PouchDB(name,options);
                                console.log(db2);
                            },1000);
                        });
                    },1000);
                });
            })
        },2000);

Thanks in advance for any help.
Steve.

Dependencies out of date

@nolanlawson there's a library being pulled in by this version that pulls in [email protected] which then pulls in [email protected], which also pulls this in crazy tree of dependencies. The latest buffer-from has no dependencies, but pouchdb-binary-utils is not up to date. I have a screenshot of npm ls (it goes down like another screens worth).

Relevant post showing many of these libraries are unnecessary anyway:

Xotic750/to-string-tag-x#4 (comment)

Would appreciate if this could be updated, or be given a pathway forward here for making a PR you'd consider

Thanks
Screen Shot 2019-05-20 at 2 01 11 pm

It works locally but is not syncing

Hello,

I am not able to sync from/to server (tried both IBM Cloudant and a hosted CouchDB server) when I use PouchDB with pouchdb-adapter-cordova-sqlite, but I can add, update and remove documents locally. I am using cordova-plugin-sqlite-2 but tried with others with same results.

If I use IndexedDB instead, it works like a charm.

I put a question in Stackoverflow with all details here:

https://stackoverflow.com/questions/54391344/pouchdb-adapter-cordova-sqlite-works-locally-but-is-not-syncing

Any clue? Thanks in advance!

PouchDB 6.4.2 - TypeError: winningRev is not a function

Issue

I am using PouchDB in a Ionic app.
With PouchDB 6.3.4 I was using the SQLite adapter for iOS. After upgrading to 6.4.2 I get this error and the db does not work:

Error in Success callbackId: SQLitePlugin1932871848 : TypeError: winningRev is not a function. (In 'winningRev(docInfo.metadata)', 'winningRev' is undefined)

Info

  • Environment: Ionic app
  • Platform: iOS
  • Adapter: pouchdb-adapter-cordova-sqlite with cordova-plugin-sqlite-2
  • Server: Couchbase

Reproduce

Use pouchdb-adapter-cordova-sqlite in iOS app with 6.4.2.

openDatabase error while using PouchDB with adapter cordova - sqlite

Hi,

I want to create windows 10 cordova application for storing offline data in pouchdb using cordova-sqlite adapter.
I used cordova-sqlite-storage along with cordova-sqlite adapter but while putting the data into db gives an error of "openDatabase is undefined", so not able to put data into db.

please let me know if anyone has faced this issue or does this approach is supported in windows 10

SQLite 'iosDatabaseLocation' does not exist error when transpile Ionic 2 apps

Hi Nolan,

I am testing PouchDB SQLite plugins recently, as I need it for my app to store data permanently on device.

I followed the instruction to install the following plugins:

  1. Cordova-sqlite-storage
  2. cordova-plugin-sqlite-2
  3. pouchdb-adapter-cordova-sqlite

My code for creating a database is:

initDB() {
    var PouchAdapterCordovaSqlite = require('pouchdb-adapter-cordova-sqlite');
    PouchDB.plugin(PouchAdapterCordovaSqlite);
    this._db = new PouchDB('birthday', {
        adapter: 'cordova-sqlite',
        iosDatabaseLocation: 'Library'
      });
    this._db.info().then(console.log.bind(console));
    let alert = this.alertCtrl.create({
      title: 'Local Storage Database',
      message: 'The adapter is: ' + this._db.adapter,
      buttons: ['Ok']
    });
    alert.present();
  }

Then I got the following error when transpile the app with webpack:

[20:11:33]  typescript: src/providers/birthday-service.ts, line: 29 
Argument of type '{ adapter: string; iosDatabaseLocation: string; }' is not assignable
to parameter of type 'DatabaseConfiguration'. Object literal may only specify known
properties, and 'iosDatabaseLocation' does not exist in type 'DatabaseConfiguration'. 

L28:    adapter: 'cordova-sqlite',
L29:    iosDatabaseLocation: 'Library'
L30:  });

After checking the docs for Cordova-sqlite-storage, I have changed:
iosDatabaseLocation: 'Library'
to
location: 'default'
but the error is still the same. It looks like the somehow the PouchDB does not use cordova SQLite storage due to the property does not exist as shown in the error message.

Could you please help me to configure the PouchDB correctly so that it actually uses SQLite? Thank you for your help. Much appreciated!

GJ Wu

Type Definitions

When specifying the iosDatabaseLocation property, the TypeScript compiler borks:

borkandbindy

pouchdb-find doesnt seem to work with it

pouchdb-find plugin doesnt seem to work with it. Im currently building a mobile app based on ionic, and been using this plugin to set pouchdb adaptor to sqlite. Using db.find result to empty array even though i know there are currently object that exists in the sqlite since ive tried to use allDocs and manually filter the result using the same criteria. I also tried to mimic it using websql and that seems to work. Im currently using array filtering and would like help since i think this waste too much processing thanks...

PouchDB Api not working

Issue

I have developed ionic application with pouch/couch db backend.My requirement is data are stored in pouch db via ionic page using put(),post() method.Make selector in iOS native page, then pass the selector to ionic page from native page using broad cast plugin.All save, fetch methods are available in ionic code(i.e) ts file.Once request received in ts code, make data fetch and pass records to native page using broad cast plugin.My issue is data fetch not working in ts file, fetch method called but find() and createIndex() not executed.Here I attached my code.

I have used
cordova-plugin-sqlite-2 plugin
pouchdb-adapter-cordova-sqlite 2.0.3 npm

Info

  • Environment: hybrid app
  • Platform: iOS
  • Adapter: cordova-sqlite
  • Server: CouchDB

Reproduce

ionic3-pouchdb-sqlite.zip
Once download my code ->folder path -> npm i -> ionic cordova build ios
Run this application in iOS simulator.Then add value in pouch db, using Employee entry page.In Menu page click Native Page, can able to view log for get(),find(),createIndex() this method.All method declaration is available in employee.ts file( provider class)

New error when data has reached certain size

I've started seeing an error in my app, which I guess is occurring now data has reached a certain size?:

2021-06-01 16:29:56.278 1669-1982/xxx.app E/SQLiteLog: (1) too many SQL variables
2021-06-01 16:29:56.306 1669-1669/xxx.app E/Capacitor/Console: File: http://localhost/vendor.js - Line 76604 - Msg: WebSQL threw an error Error: a statement with no error handler failed: too many SQL variables (code 1): , while compiling:
SELECT 'by-sequence'.seq AS seq, 'by-sequence'.deleted AS deleted, 'by-sequence'.json AS data, 'by-sequence'.rev AS rev, 'document-store'.json AS metadata FROM 'document-store' JOIN 'by-sequence' ON 'by-sequence'.seq = 'document-store'.winningseq WHERE 'document-store'.id IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ORDER BY 'document-store'.id ASC LIMIT -1 OFFSET 0
#################################################################
Error Code : 1 (SQLITE_ERROR)

I'm still investigating further, this is as much as I've been able to pull out of an android device so far. This seems like a fairly fundamental issue rather than the simple query I'm running.

Fallback to WebSQL when plugin unavailable

I use PouchDB on an Ionic project and it's awesome. With version 6, I'm not able to run my app in the browser because when setting database's adapter to cordova-sqlite it just says the plugin can't be found. I'd like it to fallback to WebSQL on browser like it did on version 5.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Install via Bower

Can this plugin be installed via bower instead of saving pouchdb.cordova-sqlite.js file in project? Or will it be available to install it via bower soon?

PouchDB ^6.4.3 - Database location or iosDatabaseLocation setting is now mandatory in openDatabase call

Hi.

I have this issue when run this library in Android

Database location or iosDatabaseLocation setting is now mandatory in openDatabase call

My code:

this._DB = new PouchDB('curriculum.db', { adapter: 'cordova-sqlite' });

If I change my code for fix this issue to

this._DB = new PouchDB('curriculum.db', { adapter: 'cordova-sqlite', iosDatabaseLocation: 'Library', androidDatabaseImplementation: 2 });
the next error is shown

{
adapter: string,
iosDatabaseLocation: string,
androidDatabaseImplementation: number
} is not assignable to parameter of type 'DatabaseConfiguration'

Console error message when using Capacitor

An error message appears in the console when using Capacitor:
Screen Shot 2021-02-15 at 12 21 08 PM

The error message is harmless and everything is working fine.
After code inspection, I found out that the checking for Capacitor doesn't exist, so I created a pull request #98 adding the checking and fixing the issue.
@paolosanchi

Add package to Bower

Very cool stuff and nicely documented !

One thing though, the package is not available on Bower, any plan for it ?

BR, Marc

Problem when use require('pouchdb-adapter-cordova-sqlite');

Hi!

Hi have this problem when use this code:

require is not native in javascript. So i used this method from cordova.

PouchDB.plugin(cordova.require('pouchdb-adapter-cordova-sqlite'));

Error: module pouchdb-adapter-cordova-sqlite not found

My environment:

Ionic : version 1.7.13
Cordova : version 6.0.0
Npm : version 2.14.9
Node : version v0.12.9
Ionic CLI : 1.7.13

WebSqlPouchCore.call is not a function

I am trying to use cordova sqllite through pouchdb in angular 4 as follows:

test.ts

import PouchDB from "pouchdb";
import cordovaSqlitePlugin from 'pouchdb-adapter-cordova-sqlite';

export class PouchdatabaseProvider {
  public db;
  constructor() {
    PouchDB.plugin(cordovaSqlitePlugin);
    this.db = new PouchDB("myDatabase", {adapter: 'cordova-sqlite'});
  } 
}

I am getting error as TypeError: WebSqlPouchCore.call is not a function

I have also followed solution #78. But I am not getting how to use .default in ts file.

I am using following versions :
pouchdb: "^6.4.1",
pouchdb-adapter-cordova-sqlite: "^2.0.2",
pouchdb-adapter-websql-core: "6.4.1",

Environment: Node => 8.9.3 , Ionic =>3.19.0
Platform: Android
Adapter: cordova-sqlite
Server: PouchDB

Kindly help.

PouchDB error: you must install a SQLite plugin ... with cordova windows

I'm getting the following error when running my app using the cordova windows platform.

PouchDB error: you must install a SQLite plugin in order for PouchDB to work on this platform. Options:
- https://github.com/nolanlawson/cordova-plugin-sqlite-2'
- https://github.com/litehelpers/Cordova-sqlite-storage'
- https://github.com/Microsoft/cordova-plugin-websql'

For the windows platform i'm using the cordova-sqlite-storage 2.0.4 plugin.

I'm getting the error message because the openDatabase method is missing as i believe window edge doesn't support webSQL

But in saying that it does look like it is using the sqliteplugin as i seen the following in the log followed by a SQLite3 step error.

OPEN database: <emailaddress>
new transaction is waiting for open operation
open db name: <emailaddress> at full path: C:\Users\Darrell\AppData\Local\Packages\com.oneplaceonline.FranchiseMgr_h35559jr9hy9m\LocalState\<emailaddress>
new transaction is waiting for open operation
OPEN database: <emailaddress> - OK
DB opened: <emailaddress>
sql exception error: SQLite3 step error result code: 1


Does PouchDB with an sqlite plugin work on the cordova windows platform?

i'm using
cordova 7.0.1
cordova [email protected]
PouchDB 6.0.7
I'm running the app on a windows 10 PC as a uwp app.

Typescript error with cordova-sqlite adapter

Hello,

I have a typescript error with the cordova-sqllite adapter :

Argument of type '{adapter:"cordova-sqlite";} is not assignable to parameter of type 'FruitDOWNAdapterConfiguration' Types of property 'adapter' are incompatible. Type "cordova-sqlite" is not assignable to type '"fruitdown"'

erreur typescript adapter cordov-sqlite

No response from db.get()

I got a problem use the adapter, the database created successfully but db.get('id') has no response, no callback no promise

Extremely poor performance compared to indexeddb

I've been trying to use this adapter as recommended by Nolan's guide to prebuilt databases on pouchdb. It's horrible! I'm not sure if it's the adapter, cordovasql, or some other problem, but it uses 15%cpu on my app constantly (this might be from building views in the background I'm not sure) and is slow to get a document. Sometimes it fails to return a query promise. It makes my app unusable. Ive had to replicate the sql database to an standard indexeddb one and now it is snappy with only approximately 2% CPU usage. This is on a galaxy note 4.

PouchDB 7.0.0 - TypeError: Cannot ready property 'id' of null

Android : 7.1.4
IOS : 4.5.5

I tried PouchDB 7.0.0 and 6.4.0 with pouchdb-adapter-cordova-sqlite 2.05 and 2.0.2
with Cordova-sqlite-storage,cordova-plugin-sqlite-2 and cordova-plugin-websql.
cacheableLayers = {
"A" : "aaaaa",
"B" : "bbbb"

}
for (let key in cacheableLayers) {

        ddoc.views[key] = {
            map: "function (doc) { "
                + "if (doc['" + key + "'] ){"
                + "emit('" + key + "',doc['" + key + "']);"
                + "}"
                + "}"
        }
    }

db.put(ddoc).then()...
When I try to put view into pouchdb I get the error: 'TypeError: Cannot read property 'id' of null' in android. Fortunately, the same code works correctly in IOS without any glitch.

Please help.
IMG-20190404-WA0002

allDocs(startkey, endkey) is slow because it counts every document every time

Related to #27 I noticed an allDocs() query from a database with 5500 documents was taking 12 seconds. The result includes the rows fetched and the total number of rows in the database. Removing the total number of rows from the query seemed to speed things up significantly. I think the majority of the time was spend counting the documents I didn't fetch. This slowness affects info() as well. Am debating whether to patch around, fix, or switch to wkwebview + indexeddb on iOS.

sync or replicate function not defined?

After using cordova-sqlite adapter, i get error when calling,, sync or replicate.from() function.

    this.localDB.sync(this.remoteDB, {
      live: true,
      retry: true
    });

i get error like this:

this.localDB.sync is not a function. (In 'this.localDB.sync(this.remoteDB, {
            live: true,
            retry: true
        })', 'this.localDB.sync' is undefined)

localDB is just this

this.localDB = new PouchDB('dbname', { adapter: 'cordova-sqlite'});

happens on both android and ios

Express pouchdb with pouchdb apdapter node websql

Issue

Unable to implement websql/riak on nodejs cordova android app . Leveldown which is by default is unsupported for platform android.

Info

  • Environment: (Node.js/browser/hybrid app/etc.)
    Hybrid app
  • Platform: (Chrome/FF/Safari/Edge/iOS/Android/etc.)
    Cordova android
  • Adapter: (IndexedDB/WebSQL/LevelDB/etc.)
    Websql/riak
  • Server: (CouchDB/Cloudant/Couchbase/PouchDB Server/etc.)
    Express-pouchdb

Hello , I have a Cordova android app that runs express-pouchdb server in it's backend . I was able to implement memdown which currently stores the data in memory and is lost once the app is restarted . So I tried to implement pouchdb adapter node websql but during the runtime it has error in leveldown.node which is 64bit but requires a 32bit on android . When I rebuilt the leveldown to 32bit it still shows error and leveldown doesnt support android .

Is there a way to change to levelup with websql adapter or help in implementation of levelup riak ? Or is there any better way to make it suitable for production?
Any help will be appreciated.

Release v2.0.5 to npm

I closed the issues related to "winningRev is not a function" and "WebSqlPouchCore.call is not a function" errors.
The v2.0.5 should solve. Can you @daleharvey publish the v2.0.5 to npm?
Thanks

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.