Skip to content

jaisonjustus/Webbase.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webbase.js

Webbase.js (not yet released) is a data manager library for javascript web applications, which provide the concept of creating tables in the storage method (localStorage) provided by the browser. its just like mimicing the database to the browser. Basic operations that webbase support are " insert, delete, update, select, select..where and join. "

  • Method to create a table. table name and data is madatory, primary key which is not mandatory.

    Webbase.Storage.create(table_name, data, primary_key);
    Webbase.Storage.create('student',{
        id : 'number',
        name : 'string',
        marks : 'number'
    },'id');
  • Method to insert record to the table.

    Webbase.Storage.insert(table_name, data);
    Webbase.Storage.insert('student',{
        id : 5225,
        name : "Jaison Justus",
        marks : 53
    });
  • Method to delete record from the table.

    Webbase.Storage.from(table_name).where(condition).delete();
    Webbase.Storage.from('student').where('{id} == 5225').delete();
  • Method to update record in the table.

    Webbase.Storage.from(table_name).set(data).where(condition).update();
    Webbase.Storage.from('student').set({ marks : 69 }).where('{id} == 5225 || {id} == 5222').update();
  • Method to select record from a table.

    Webbase.Storage.select(fields).from(table_name).where(condition).find();
    Webbase.Storage.select('name,marks').from('student').where('{id} == 5222').find();
  • Method to select record by joining Multiple table.

    Webbase.Storage.select(fields[student_fieldname]).join(tables).where(condition).find();
    Webbase.Storage.select('student_name,student_marks,score_english').join('student.score').where('{id} == 5222').find();

About

A Javascript Storage Library implemented using localstorage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •