Skip to content

Commit 6fc19e3

Browse files
authored
Merge pull request #29 from duckdb/jray/add-alias-and-append-default-to-api
add alias and append default to api
2 parents 0219c0e + 0b486fa commit 6fc19e3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

api/src/DuckDBAppender.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ export class DuckDBAppender {
2727
public endRow() {
2828
duckdb.appender_end_row(this.appender);
2929
}
30+
public appendDefault() {
31+
duckdb.append_default(this.appender);
32+
}
3033
public appendBoolean(value: boolean) {
3134
duckdb.append_bool(this.appender, value);
3235
}

api/src/DuckDBLogicalType.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ export class DuckDBLogicalType {
139139
public get typeId(): DuckDBTypeId {
140140
return duckdb.get_type_id(this.logical_type) as number as DuckDBTypeId;
141141
}
142+
public get alias(): string | null {
143+
return duckdb.logical_type_get_alias(this.logical_type);
144+
}
145+
public set alias(newAlias: string) {
146+
duckdb.logical_type_set_alias(this.logical_type, newAlias);
147+
}
142148
public asType(): DuckDBType {
143149
switch (this.typeId) {
144150
case DuckDBTypeId.BOOLEAN:

0 commit comments

Comments
 (0)