Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Mar 30, 2024
1 parent cd187e1 commit 13cd713
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ With the AST helper methods, creating complex SQL ASTs becomes straightforward a
import { CreateStmt, ColumnDef } from '@pgsql/types';
import ast from '@pgsql/utils';

const newColumn = ast.columnDef({
colname: 'id',
typeName: ast.typeName({
names: [ast.string({ str: 'int4' })]
})
const newColumn: ColumnDef = ast.columnDef({
colname: 'id',
typeName: ast.typeName({
names: [ast.string({ str: 'int4' })]
})
});

const createStmt = ast.createStmt({
relation: ast.rangeVar({
relname: 'new_table'
}),
tableElts: [newColumn]
const createStmt: CreateStmt = ast.createStmt({
relation: ast.rangeVar({
relname: 'new_table'
}),
tableElts: [newColumn]
});
```

Expand Down

0 comments on commit 13cd713

Please sign in to comment.