/* Copyright (c) 2020, 2023, The Unified Company. This code is part of Unify. This program is free software; you can redistribute it and/or modify it under the terms of the ESA Software Community License - Strong Copyleft LICENSE, as published by the ESA. See the ESA Software Community License - Strong Copyleft LICENSE, for more details. https://unifyjs.org */ import tools from '../unify/tools.js'; import Console from './console.js'; import database from './database.js'; import datatype from '../unify/datatype.js'; import collection from '../unify/collection.js'; import querySQL from '../unify/querySQL.js'; import tableLogger from './tableLogger.js'; export default class databaseManager{ tables = new Array(); parse( object ) { if( object.type == "table" ) { if( !object.table ) { var objectName = object.getClassName(); var tableObject = tools.getTableFromObject( object ); object.table = tableObject; } else { var tableObject = object.table; } this.addTable( tableObject ) } } addTable( tableObject ) { var className = tools.getClassName( tableObject ); if ( !this.getTableByName( className ) ) { this.tables.push( tableObject ); } } getTableByName( name ){ for( var c = 0; c