alasql
Version:
AlaSQL.js - JavaScript SQL database library for relational and graph data manipulation with support of localStorage, IndexedDB, and Excel
47 lines (35 loc) • 725 B
JavaScript
/*
//
// Table class for Alasql.js
// Date: 14.11.2014
// (c) 2014, Andrey Gershun
//
*/
// Table class
var Table = alasql.Table = function(params){
// Columns
this.columns = [];
this.xcolumns = {};
// Data array
this.data = [];
this.inddefs = {};
this.indices = {};
this.uniqs = {};
this.uniqdefs = {};
extend(this,params);
};
// View = function(){
// this.data = [];
// this.columns = [];
// this.ixcolumns = {};
// this.ixdefs = {};
// this.indices = {};
// };
// alasql.View = View;
Table.prototype.indexColumns = function() {
var self = this;
self.xcolumns = {};
self.columns.forEach(function(col){
self.xcolumns[col.columnid] = col;
});
}