-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {IBooleanColumnDesc} from '../../model'; | ||
import ColumnBuilder from './ColumnBuilder'; | ||
|
||
export default class BooleanColumnBuilder extends ColumnBuilder<IBooleanColumnDesc> { | ||
|
||
constructor(column: string) { | ||
super('boolean', column); | ||
} | ||
|
||
trueMarker(marker: string) { | ||
this.desc.trueMarker = marker; | ||
return this; | ||
} | ||
|
||
falseMarker(marker: string) { | ||
this.desc.falseMarker = marker; | ||
return this; | ||
} | ||
} | ||
|
||
/** | ||
* builds a boolean column builder | ||
* @param {string} column column which contains the associated data | ||
* @returns {BooleanColumnBuilder} | ||
*/ | ||
export function buildBooleanColumn(column: string) { | ||
return new BooleanColumnBuilder(column); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters