Skip to content

Commit

Permalink
Merge pull request #29 from duckdb/jray/add-alias-and-append-default-…
Browse files Browse the repository at this point in the history
…to-api

add alias and append default to api
  • Loading branch information
jraymakers authored Oct 20, 2024
2 parents 0219c0e + 0b486fa commit 6fc19e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/src/DuckDBAppender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export class DuckDBAppender {
public endRow() {
duckdb.appender_end_row(this.appender);
}
public appendDefault() {
duckdb.append_default(this.appender);
}
public appendBoolean(value: boolean) {
duckdb.append_bool(this.appender, value);
}
Expand Down
6 changes: 6 additions & 0 deletions api/src/DuckDBLogicalType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ export class DuckDBLogicalType {
public get typeId(): DuckDBTypeId {
return duckdb.get_type_id(this.logical_type) as number as DuckDBTypeId;
}
public get alias(): string | null {
return duckdb.logical_type_get_alias(this.logical_type);
}
public set alias(newAlias: string) {
duckdb.logical_type_set_alias(this.logical_type, newAlias);
}
public asType(): DuckDBType {
switch (this.typeId) {
case DuckDBTypeId.BOOLEAN:
Expand Down

0 comments on commit 6fc19e3

Please sign in to comment.