2020-04-18 20:43:02 +02:00
|
|
|
import { Column } from './Column';
|
|
|
|
|
|
|
|
export class Table {
|
|
|
|
public name: string;
|
|
|
|
public columns: Array<Column> = [];
|
|
|
|
|
|
|
|
public constructor (name: string) {
|
|
|
|
this.name = name;
|
|
|
|
}
|
2020-04-19 18:49:07 +02:00
|
|
|
|
|
|
|
public get_column (name: string): Column|null {
|
|
|
|
for (const col of this.columns) {
|
|
|
|
if (col.name === name)
|
|
|
|
return col;
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
2020-04-18 20:43:02 +02:00
|
|
|
}
|