Skip to content

Commit

Permalink
accept null or undefined for logical type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
jraymakers committed Jan 25, 2025
1 parent 7bf4079 commit 62cd753
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/DuckDBLogicalType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ export class DuckDBLogicalType {
public get alias(): string | undefined {
return duckdb.logical_type_get_alias(this.logical_type) || undefined;
}
public set alias(newAlias: string) {
duckdb.logical_type_set_alias(this.logical_type, newAlias);
public set alias(newAlias: string | null | undefined) {
duckdb.logical_type_set_alias(this.logical_type, newAlias || '');
}
public asType(): DuckDBType {
const alias = this.alias;
Expand Down

0 comments on commit 62cd753

Please sign in to comment.