From 13cd713bbc1bd073edfa62266d02b9b9762eddf9 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sat, 30 Mar 2024 09:04:27 -0700 Subject: [PATCH] readme --- packages/utils/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/utils/README.md b/packages/utils/README.md index 46092c5..cd1f54f 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -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] }); ```