0.3.0 • Published 8 years ago
sqlite-pusher v0.3.0
sqlite-pusher
Push sqlite entries for uni-directional synchronisation. Syncs based on an incremental field of the database's table.
Configuration
[
{
"database": "path/to/database/file",
"table": "table-name",
"urls": [
{
"lastUrl": "",
"pushUrl": ""
}
],
"chunkSize": 3,
"incrCol": "id",
"interval": 2000
}
]
database
: sqlite database file to pushtable
: name of sqlite tableurls
:lastUrl
: Send aGET
request to the given url to get the state of the synchronisation (last entry's incremental column). If returns 404 the sync start at an increment of 0.pushUrl
: SendPUT
request to the given url with a json that contains the new entriesincrCol
: the name of the incremental column in the sqlite tablechunkSize
: data is sent chunk by chunk with the given chunk sizeinterval
: time interval with which to query the table to ask for new changes