27 lines
585 B
TypeScript
27 lines
585 B
TypeScript
/*
|
|
* 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
|
|
*/
|
|
|
|
import { Column } from './Column';
|
|
|
|
export class Table {
|
|
public name: string;
|
|
public columns: Array<Column> = [];
|
|
|
|
public constructor (name: string) {
|
|
this.name = name;
|
|
}
|
|
|
|
public get_column (name: string): Column|null {
|
|
for (const col of this.columns) {
|
|
if (col.name === name)
|
|
return col;
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|