Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Read about IndexedDB:
- https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB
- https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB
- 2. Implement an application that uses IndexedDB, following the requirements:
- - your subject area is "Crime reports"; each entry in your table will represent such report, with following fields describing it: date/time, address, district, beat, grid, crime description, UCR NCIC code, latitude, longitude;
- example dataset may be found here:
- https://drive.google.com/file/d/1uXeWHwbev_9ah0MVX-g373CfBLTbsU4D/view?usp=sharing
- - immediately after start, application should check: if there is no database with corresponding name and version stored in browser, it should be created (using 'onupgradeneeded' callback);
- - application should allow to add data to DB: either via form, or by uploading CSV file (interim transform to JSON may be required); when adding via file upload, set of fields should be validated first;
- - application should allow to view data from DB;
- in brief, table should be similar to this: https://i.imgur.com/jwjO67P.png
- table should be paginated - each page should contain up to 20 entries;
- clicking on column header should cause sorting by that column (ascending);
- - application should allow to drop distinct entries or the whole table at once;
- - application should allow to perform text search by 'crime description' field (note: out of the box, IDB only allows to look for full matches; what you are going to implement is rather 'like' operator: match any text occurances, case-insensitive).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement