How to use the jsstore.DATA_TYPE.Array 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 / scripts / qry_result.ts View on Github external
printResult(qryResult: IResult) {
        if (this.shouldProcess()) {
            this.errorMessage = "";
            var resultType = Util.getType(qryResult.result);
            this.resultCount =
                resultType === DATA_TYPE.Array
                    ? qryResult.result.length
                    : 0;
            this.timeTaken = qryResult.timeTaken.toString();
            this.showResultInfo = true;
            let result = qryResult.result;
            switch (resultType) {
                case DATA_TYPE.Array:
                    var rowsLength = result.length,
                        htmlString = "",
                        props: string[] = [];
                    for (var prop in result[0]) {
                        props.push(prop);
                        htmlString += "" + prop + "";
                    }
                    const propLength = props.length;
                    htmlString += "";
                    // var width = 100 / propLength;
                    for (var i = 0; i < rowsLength; i++) {
                        var tempHtml = "";
                        for (var j = 0; j < propLength; j++) {
                            if (result[0] && result[0][0]) {
                                tempHtml += "" + result[i][props[j]] + "";
                            } else {
github mvdicarlo / postybirb / src / app / database / tables / submission.table.ts View on Github external
name: 'submissionType',
    dataType: DATA_TYPE.String,
    notNull: true
  }, {
    name: 'schedule',
    dataType: DATA_TYPE.Number
  }, {
    name: 'isScheduled',
    dataType: DATA_TYPE.Boolean,
    default: false
  }, {
    name: 'fileInfo',
    dataType: DATA_TYPE.Object
  }, {
    name: 'additionalFileInfo',
    dataType: DATA_TYPE.Array
  }, {
    name: 'fileMap',
    dataType: DATA_TYPE.Object
  }, {
    name: 'formData',
    dataType: DATA_TYPE.Object
  }, {
    name: 'postStats',
    dataType: DATA_TYPE.Object
  }]
}

export { SubmissionTable, SubmissionTableName }
github ujjwalguptaofficial / idbstudio / src / scripts / qry_result.ts View on Github external
printResult(qryResult: IResult) {
        if (this.shouldProcess()) {
            this.errorMessage = "";
            var resultType = Util.getType(qryResult.result);
            this.resultCount =
                resultType === DATA_TYPE.Array
                    ? qryResult.result.length
                    : 0;
            this.timeTaken = qryResult.timeTaken.toString();
            this.showResultInfo = true;
            let result = qryResult.result;
            switch (resultType) {
                case DATA_TYPE.Array:
                    var rowsLength = result.length,
                        htmlString = "",
                        props: string[] = [];
                    for (var prop in result[0]) {
                        props.push(prop);
                        htmlString += "" + prop + "";
                    }
                    const propLength = props.length;
                    htmlString += "";
github ujjwalguptaofficial / idbstudio / src / util.ts View on Github external
static getType(value) {
        if (value === null) {
            return DATA_TYPE.Null;
        }
        var type = typeof value;
        switch (type) {
            case 'object':
                if (Array.isArray(value)) {
                    return DATA_TYPE.Array;
                }
            default:
                return type;
        }
    }

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 1 month ago

Package Health Score

71 / 100
Full package analysis