2020-05-07 18:40:35 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) SapphireCode - All Rights Reserved
|
|
|
|
* This file is part of Snippeteer which is released under BSD-3-Clause.
|
|
|
|
* See file 'LICENSE' for full license details.
|
|
|
|
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
|
|
|
*/
|
|
|
|
|
2020-04-18 20:43:02 +02:00
|
|
|
import { Table } from './Table';
|
|
|
|
|
|
|
|
export class Database {
|
|
|
|
public tables: Array<Table> = [];
|
2020-04-19 18:49:07 +02:00
|
|
|
|
|
|
|
public get_table (name: string): Table|null {
|
|
|
|
for (const table of this.tables) {
|
|
|
|
if (table.name === name)
|
|
|
|
return table;
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
2020-04-18 20:43:02 +02:00
|
|
|
}
|