HTML5 webkit key-value store based on browser SQL

We want a javascript 'class' developed that is a (syncronizable) key-value store. It is only required to work on webkit browsers (Safari / Chrome)

This shall be backed by a SQL table with the following fields:

- key (TEXT, Not NULL)

- value (TEXT, Not NULL)

- sync_state (INT, Not NULL)

- timestamp (TIMESTAMP, can be NULL)

- is_deleted (BIT, Not NULL)

For this we want a 'class' that implements the following methods:

A constructor that ensures that the database table is present or creates it if needed.

setItem(key, value)

- add or update the value identified by key.

- set sync_state=1

- new items get NULL for timestamp


- set is_deleted=true for item

- set sync_state=1


- return value of item

- if item is_deleted this is the same as if the item doesn't exist


- return array of key, value pairs

- if item is_deleted = 1 then do not include item

- return empty array if no items defined

In addition for synchronizing this key-value store we need:


- return an object with


maxTimestamp: (the max value of all timestamps in the database)

items: [

{key: ..., value: ..., timestamp: ..., is_deleted: ... },

{key: ..., value: ..., timestamp: ..., is_deleted: ... },

{key: ..., value: ..., timestamp: ..., is_deleted: ... },

{key: ..., value: ..., timestamp: ..., is_deleted: ... },

... etc ...


- items are all rows in the database with sync_state=1


- the argument arrayOfNewAndChangedItems is a list of

{key: ..., value: ..., timestamp: ..., is_deleted: ... }

- these should update existing items based on key or add new items. sync_state is set to 0.

Skills: Javascript, SQL

See more: html5 key value store items, html5 key value store, key value store browser, set of pairs, implements set, html5 text, t-sql with, t-sql in, webkit, Value, update store, timestamp, t-sql;, sql work needed, sql based, javascript html5, html5 sql, database html sql, sql update text, html5 based, html based text, sql javascript, table set html, sql required, update text sql

About the Employer:
( 30 reviews ) Bruvik, Norway

Project ID: #1266490

Awarded to:


Dear Please check PMB.

$120 USD in 4 days
(1 Review)

2 freelancers are bidding on average $110 for this job


Hi There, Give me a chance to do this for you... Read my review.. I'll prefer Quality and will make you happy through my work.. Thanks Its like a simplest task for me to do..

$100 USD in 2 days
(1 Review)