Closed kidwm closed 8 years ago
Please post questions at https://groups.google.com/forum/#!forum/loopbackjs. See https://github.com/strongloop/loopback/wiki/Questions for more details.
@crandmck Are there docs for this connector?
@kidwm Did you go through the README? It works just like any other connector. There are is no tutorial or examples. I suggest going through the tests to see how things work: https://github.com/strongloop/loopback-connector-sqlite3/blob/master/test/sqlite.test.js
In general, we don't document community connectors such as the SQLite. Instead, you should refer to the doc in GitHub.
@crandmck So this repo is a community connector, too?
@kidwm It looks like it according to @crandmck.
@crandmck I noticed the docs also point to Synerzip's sqlite implementation (https://docs.strongloop.com/display/public/LB/Community+connectors). Any reason why we don't point at the https://github.com/strongloop/loopback-connector-sqlite3?
@superkhau I created this connector but havent had time to put it through its paces as yet.
@kidwm is something not working? your DS definition seems fine...
@kraman I don't mind helping out with maintaining it if we make it official. Let's get @raymondfeng's input on this. At least we should make it a SL labs project as suggested by @crandmck.
@kraman I changed my DS from mongodb to this connector, but it give this error message:
SQLITE_ERROR: no such table: item
@kidwm Did you auto-migrate/auto-update? https://docs.strongloop.com/display/public/LB/Implementing+auto-migration
I think the relevant doc is https://docs.strongloop.com/display/public/LB/Creating+a+database+schema+from+models. The above is for someone building their own connector.
@superkhau No, I didn't. it says Implementing auto-migration is optional for connector.
@crandmck So I have to create the schema by myself?
@kidwm Implementing auto-migration is optional for connector
because DBs like mongo and memory can store arbitrary documents. However, SQL like databases require that the tables be defined and so you need to auto-migrate/auto-update or create tables manually before you can use them.
@kraman Thank you for explanation.
I've tried to migrate from https://github.com/Synerzip/loopback-connector-sqlite but don't know how to start with this and find no info on https://docs.strongloop.com/
and this is my datasources.json: