How to use the jsstore.Column function in jsstore

To help you get started, we’ve selected a few jsstore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ujjwalguptaofficial / idbstudio / src / dist / bundle.js View on Github external
name: 'Orders',
            columns: [
                new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.PrimaryKey]),
                new jsstore_1.Column('customerId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('orderDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
                new jsstore_1.Column('shipperId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var products = {
            name: 'Products',
            columns: [
                new jsstore_1.Column('productId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('productName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('supplierId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('categoryId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('unit').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('price').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var shippers = {
            name: 'Shippers',
            columns: [
                new jsstore_1.Column('shipperId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('shipperName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('phone').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var suppliers = {
            name: 'Suppliers',
            columns: [
                new jsstore_1.Column('supplierId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
github ujjwalguptaofficial / idbstudio / src / dist / bundle.js View on Github external
DemoService.prototype.getDbSchema = function () {
        var customers = {
            name: 'Customers',
            columns: [
                new jsstore_1.Column('customerId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('customerName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('contactName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('address').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('city').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('postalCode').setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('country').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String)
            ]
        };
        var categories = {
            name: 'Categories',
            columns: [
                new jsstore_1.Column('categoryId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('categoryName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('description').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var employees = {
            name: 'Employees',
            columns: [
                new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
github ujjwalguptaofficial / idbstudio / src / dist / bundle.js View on Github external
]
        };
        var employees = {
            name: 'Employees',
            columns: [
                new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('lastName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('birthDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
                new jsstore_1.Column('photo').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('notes').setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var order_details = {
            name: 'OrderDetails',
            columns: [
                new jsstore_1.Column('orderDetailId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('productId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('quantity').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var orders = {
            name: 'Orders',
            columns: [
                new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.PrimaryKey]),
                new jsstore_1.Column('customerId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('orderDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
                new jsstore_1.Column('shipperId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var products = {
github ujjwalguptaofficial / idbstudio / src / dist / bundle.js View on Github external
name: 'Customers',
            columns: [
                new jsstore_1.Column('customerId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('customerName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('contactName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('address').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('city').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('postalCode').setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('country').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String)
            ]
        };
        var categories = {
            name: 'Categories',
            columns: [
                new jsstore_1.Column('categoryId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('categoryName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('description').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var employees = {
            name: 'Employees',
            columns: [
                new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('lastName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('birthDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
                new jsstore_1.Column('photo').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('notes').setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var order_details = {
            name: 'OrderDetails',
            columns: [
github ujjwalguptaofficial / idbstudio / src / dist / bundle.js View on Github external
var categories = {
            name: 'Categories',
            columns: [
                new jsstore_1.Column('categoryId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('categoryName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('description').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var employees = {
            name: 'Employees',
            columns: [
                new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('lastName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('birthDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
                new jsstore_1.Column('photo').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('notes').setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var order_details = {
            name: 'OrderDetails',
            columns: [
                new jsstore_1.Column('orderDetailId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('productId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('quantity').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var orders = {
            name: 'Orders',
            columns: [
                new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.PrimaryKey]),
                new jsstore_1.Column('customerId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
github ujjwalguptaofficial / idbstudio / src / dist / bundle.js View on Github external
var orders = {
            name: 'Orders',
            columns: [
                new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.PrimaryKey]),
                new jsstore_1.Column('customerId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('orderDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
                new jsstore_1.Column('shipperId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var products = {
            name: 'Products',
            columns: [
                new jsstore_1.Column('productId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('productName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('supplierId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('categoryId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('unit').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('price').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var shippers = {
            name: 'Shippers',
            columns: [
                new jsstore_1.Column('shipperId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('shipperName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('phone').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var suppliers = {
            name: 'Suppliers',
            columns: [
github ujjwalguptaofficial / idbstudio / src / dist / bundle.js View on Github external
new jsstore_1.Column('country').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String)
            ]
        };
        var categories = {
            name: 'Categories',
            columns: [
                new jsstore_1.Column('categoryId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('categoryName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('description').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var employees = {
            name: 'Employees',
            columns: [
                new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('lastName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('birthDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
                new jsstore_1.Column('photo').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('notes').setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var order_details = {
            name: 'OrderDetails',
            columns: [
                new jsstore_1.Column('orderDetailId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('productId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('quantity').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var orders = {
            name: 'Orders',
github ujjwalguptaofficial / idbstudio / src / dist / bundle.js View on Github external
name: 'Shippers',
            columns: [
                new jsstore_1.Column('shipperId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('shipperName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('phone').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var suppliers = {
            name: 'Suppliers',
            columns: [
                new jsstore_1.Column('supplierId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('supplierName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('contactName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('address').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('city').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('postalCode').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('country').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('phone').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String)
            ]
        };
        var dataBase = {
            name: this.dbName,
            tables: [
                customers,
                categories,
                employees,
                order_details,
                orders,
                products,
                shippers,
                suppliers
            ]
github ujjwalguptaofficial / idbstudio / src / dist / bundle.js View on Github external
]
        };
        var orders = {
            name: 'Orders',
            columns: [
                new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.PrimaryKey]),
                new jsstore_1.Column('customerId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('orderDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
                new jsstore_1.Column('shipperId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var products = {
            name: 'Products',
            columns: [
                new jsstore_1.Column('productId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('productName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('supplierId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('categoryId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
                new jsstore_1.Column('unit').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('price').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
            ]
        };
        var shippers = {
            name: 'Shippers',
            columns: [
                new jsstore_1.Column('shipperId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
                new jsstore_1.Column('shipperName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
                new jsstore_1.Column('phone').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
            ]
        };
        var suppliers = {

jsstore

Harness the power of JsStore to streamline database operations in your web applications. With its SQL-like API, JsStore simplifies IndexedDB interactions, enabling developers to easily query, filter, and manipulate data with familiar syntax and efficiency

MIT
Latest version published 7 days ago

Package Health Score

78 / 100
Full package analysis