pouchdb

SCP (Security Content Policy) issue with pouchdb

烈酒焚心 提交于 2019-12-24 18:04:08
问题 I see an error in the console when running my ionic app on my android device: Refused to connect to 'blob:http%3A//192.168.0.12%3A8100/9d72a06a-c6fa-4397-976c-41ea23f90be0' because it violates the following Content Security Policy directive: "default-src *". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback. i @ pouchdb.min.js:9 (index):28 Uncaught SecurityError: Failed to execute 'open' on 'XMLHttpRequest': Refused to connect to 'blob:http%3A//192.168.0

SCP (Security Content Policy) issue with pouchdb

北战南征 提交于 2019-12-24 18:04:07
问题 I see an error in the console when running my ionic app on my android device: Refused to connect to 'blob:http%3A//192.168.0.12%3A8100/9d72a06a-c6fa-4397-976c-41ea23f90be0' because it violates the following Content Security Policy directive: "default-src *". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback. i @ pouchdb.min.js:9 (index):28 Uncaught SecurityError: Failed to execute 'open' on 'XMLHttpRequest': Refused to connect to 'blob:http%3A//192.168.0

Pouchdb. How to verify a doc is replicated

时光毁灭记忆、已成空白 提交于 2019-12-24 17:14:18
问题 Im using poychdb basically to let a mobile user create sales orders offline, then later replicate them to central couchdb server, then process them there on a cron job basis. As replication can sync some docs...then stop (lost Internet. ..) i need a way to block the mobile user from editing those already synced orders. But hd can still edit other non-yet-uploaded orders There is some way to do that? 回答1: The replicate() function returns an event emitter which emits a 'change' event: http:/

Must pouchdb _id property values be globally unique?

房东的猫 提交于 2019-12-24 09:18:42
问题 The PouchDB Manual suggests using Date().toJSON() to generate a new id for each document. However this an result in _id values that are identical.. Does PouchDB have a built in mechanism for dealing with this or should we be using something like eventid? Specifically the Date().toJson() could produce id values are at the same instant in time like this: 2018-01-26T21:12:15.574Z 2018-01-26T21:12:15.574Z 2018-01-26T21:12:15.575Z If a document already has an _id of 2018-01-26T21:12:15.574Z and

Cloudant/Couchdb Architecture

房东的猫 提交于 2019-12-24 08:06:20
问题 I'm building an address-book app that uses a back-end Cloudant database. The database stores 3 types of documents: -> User Profile document -> Group document -> User-to-Group Link document As the names of the document go, there are users in my database, there are groups for users(like whatsapp), and there are link documents for each user to a group (the link document also stores settings/privileges of that user in that group). My client-side app on login, queries cloudant for the user

SQL Server and Firebase/PouchDB synchronization

…衆ロ難τιáo~ 提交于 2019-12-24 05:55:04
问题 I am building a web application where the client needs browser access to data storage while offline. I'm thinking of using either a Firebase or PouchDB database to achieve this inside the application. However, for the back-end I am using SQL Server. Can I synchronize the data from Firebase/PouchDB over to ms sql server engine and store it persistently? Will MS SQL Server's JSON support allow me to do this or am I wasting my time going down this route? The application is being written using

PouchDB relational-pouch and pouchdb-find with Angular5/Typescript

谁说我不能喝 提交于 2019-12-24 05:36:09
问题 I'm testing PouchDB with an Angular5 project. I want to use these pouchdb plugins: pouchdb-find relational-pouch So I know how to import PouchDB: import PouchDB from 'pouchdb'; I also know how to import the pouchdb-find and add to PouchDB import PouchDBFind from 'pouchdb-find'; PouchDB.plugin(PouchDBFind); But next I also want to add the relational-pouch plugin: import PouchDBRelational from 'relational-pouch'; PouchDB.plugin(PouchDBRelational); The Typescript compiler will compile this, but

Does pouchdb leave deleted tombstones like couchdb does?

旧城冷巷雨未停 提交于 2019-12-24 03:34:16
问题 I have a hybrid app that generates a lot of tombstones on couchdb. About 100,000 a month on the server. Each user should be getting about 4 a day. Does Pouchdb maintain tombstones? Or do they get compacted or purged? Or is there a command to do that? Or do I have to drop the database and recreate periodically? Thanks 回答1: Pouchdb does keep a tombstone when deleting a document. Purge is not available yet for PouchDB so the only way to completely deletes documents is by deleting the local

How to purge a document

假如想象 提交于 2019-12-24 01:18:40
问题 How can I purge (not remove) a PouchDB document similar to CouchDB _purge operation. Note: Purge is different from remove (or delete). It is as though the database had never heard of document at all. 来源: https://stackoverflow.com/questions/17028018/how-to-purge-a-document

PouchDB ETIMEDOUT error

不问归期 提交于 2019-12-24 00:49:37
问题 So we've been building an app that uses couchDb/cloudant with Pouchdb as our driver client side (ionic framework) and server side (node). Of late we've been getting errors when connecting to the remote, that seem to appear at random and only disappear temporarily restarting the app, or opening a new browser. update-data.service.js:38 Error: ETIMEDOUT(…)(anonymous function) @ update-data.service.js:38processQueue @ angular.js:16383(anonymous function) @ angular.js:16399$eval @ angular.js:17682