{"id":15379152,"url":"https://github.com/manolo/vaadin-pouchdb","last_synced_at":"2025-04-14T08:54:50.361Z","repository":{"id":58228488,"uuid":"45462415","full_name":"manolo/vaadin-pouchdb","owner":"manolo","description":"polymer web component for pouchdb","archived":false,"fork":false,"pushed_at":"2017-09-26T09:39:23.000Z","size":27,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T22:32:38.540Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manolo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-03T11:36:45.000Z","updated_at":"2017-10-02T14:03:37.000Z","dependencies_parsed_at":"2022-08-31T09:20:36.479Z","dependency_job_id":null,"html_url":"https://github.com/manolo/vaadin-pouchdb","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manolo%2Fvaadin-pouchdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manolo%2Fvaadin-pouchdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manolo%2Fvaadin-pouchdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manolo%2Fvaadin-pouchdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manolo","download_url":"https://codeload.github.com/manolo/vaadin-pouchdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852109,"owners_count":21171839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T14:18:27.202Z","updated_at":"2025-04-14T08:54:50.340Z","avatar_url":"https://github.com/manolo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"vaadin-pouchdb\n========\n\nA polymer web component wrapping [PouchDB](http://pouchdb.com/).\n\nIt's goal is the simplicity of setting up an application which works online / offline.\nNothing else needed for observing connectivity, changes in a list, etc.\n\nDisclaimer: I have developed this component on my Comunity-Fridays hours at Vaadin, this is the reason of the component's name. The element is not part of the official set of Vaadin Core Elements.\n\n## Quick Start\n\n```\n    \u003cvaadin-pouchdb id=\"db\"\n      dbname=\"chat\"\n      index=\"ts\"\n      data=\"{{items}}\"\n      remote=\"http://user:password@localhost:5984/chat\"\n     \u003e\u003c/vaadin-pouchdb\u003e\n     \n     \u003cvaadin-grid id=\"grid\" items=\"{{items}}\"\u003e\n      \u003ctable\u003e\n        \u003ccolgroup\u003e\n         \u003ccol /\u003e\u003ccol /\u003e\n         \u003c/colgroup\u003e\n      \u003c/table\u003e\n     \u003c/vaadin-grid\u003e\n```\n\n```\n    // Add a new item to the database.\n    // We could use db.data instead of grid.items.\n    this.$.grid.push('items', { name: 'Manolo', country: 'Spain'});\n    // Modify an item in the database\n    this.$.grid.set('items.0.country', 'Finland');\n    // Remove an item from the database\n    this.$.grid.pop('items');\n```\n\n- Use a local database `chat` which will be synchronised with the one specified in the `remote` parameter.\n    - Remote could be either couchdb or pouchdb. If you don't specify any remote, it will be use a local instance only.\n- Any changes in the `data` array using the `Polymer` API will be propagated to the database, and any change in the database to the array.\n    - Use polymer data-binding as usual.\n- Create an index `ts`, and use it to query the database.\n    - If not provided it get all items sorted by `_id`\n- It queries all items in the database (no filtering)\n    - You could configure the `queryString` parameter though.\n\n\n## For GWT users\n\nOnce you have added the gwt-polymer-api\n\nYou can wrap the element using vaadin the gwt-api-generator:\n\n```\n  $ sudo npm install vaadin/gwt-api-generator -g\n  $ bower install manolo/vaadin-pouchdb\n  $ gwt-api-generator \n```\n\nThen you will get all needed classes in your `src/main/java` folder\n\nYour project should also depend on vaadin gwt-polymer-elements\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanolo%2Fvaadin-pouchdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanolo%2Fvaadin-pouchdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanolo%2Fvaadin-pouchdb/lists"}