@@ -231,9 +231,7 @@ describe("QuestDB Parser", () => {
231231 } )
232232
233233 it ( "should parse INSERT INTO with quoted table name" , ( ) => {
234- const result = parseToAst (
235- "INSERT INTO 'my_table' VALUES (1, 2, 3)" ,
236- )
234+ const result = parseToAst ( "INSERT INTO 'my_table' VALUES (1, 2, 3)" )
237235
238236 expect ( result . errors ) . toHaveLength ( 0 )
239237 expect ( result . ast [ 0 ] . type ) . toBe ( "insert" )
@@ -401,8 +399,12 @@ describe("QuestDB Parser", () => {
401399 )
402400 expect ( result . errors ) . toHaveLength ( 0 )
403401 const select = result . ast [ 0 ] as AST . SelectStatement
404- expect ( ( select as unknown as Record < string , unknown > ) . window ) . toBeUndefined ( )
405- expect ( ( select as unknown as Record < string , unknown > ) . windowDefinitions ) . toBeUndefined ( )
402+ expect (
403+ ( select as unknown as Record < string , unknown > ) . window ,
404+ ) . toBeUndefined ( )
405+ expect (
406+ ( select as unknown as Record < string , unknown > ) . windowDefinitions ,
407+ ) . toBeUndefined ( )
406408
407409 const col = select . columns [ 0 ] as AST . ExpressionSelectItem
408410 const fn = col . expression as AST . FunctionCall
@@ -462,9 +464,7 @@ describe("QuestDB Parser", () => {
462464 } )
463465
464466 it ( "should serialize INSERT with quoted table name" , ( ) => {
465- const result = parseToAst (
466- "INSERT INTO 'my_table' VALUES (1, 2, 3)" ,
467- )
467+ const result = parseToAst ( "INSERT INTO 'my_table' VALUES (1, 2, 3)" )
468468 const sql = toSql ( result . ast [ 0 ] )
469469
470470 expect ( sql ) . toContain ( "INSERT INTO my_table" )
@@ -585,7 +585,10 @@ describe("QuestDB Parser", () => {
585585 { type : "columnDefinition" , name : "name" , dataType : "STRING" } ,
586586 ] ,
587587 indexes : [
588- { type : "indexDefinition" , column : { type : "qualifiedName" , parts : [ "name" ] } } ,
588+ {
589+ type : "indexDefinition" ,
590+ column : { type : "qualifiedName" , parts : [ "name" ] } ,
591+ } ,
589592 ] ,
590593 }
591594 const sql = toSql ( stmt )
@@ -609,10 +612,19 @@ describe("QuestDB Parser", () => {
609612 left : {
610613 type : "binary" ,
611614 operator : "+" ,
612- left : { type : "column" , name : { type : "qualifiedName" , parts : [ "a" ] } } ,
613- right : { type : "column" , name : { type : "qualifiedName" , parts : [ "b" ] } } ,
615+ left : {
616+ type : "column" ,
617+ name : { type : "qualifiedName" , parts : [ "a" ] } ,
618+ } ,
619+ right : {
620+ type : "column" ,
621+ name : { type : "qualifiedName" , parts : [ "b" ] } ,
622+ } ,
614623 } as AST . BinaryExpression ,
615- right : { type : "column" , name : { type : "qualifiedName" , parts : [ "c" ] } } ,
624+ right : {
625+ type : "column" ,
626+ name : { type : "qualifiedName" , parts : [ "c" ] } ,
627+ } ,
616628 } as AST . BinaryExpression ,
617629 } as AST . ExpressionSelectItem ,
618630 ] ,
@@ -1057,9 +1069,7 @@ describe("QuestDB Parser", () => {
10571069 } )
10581070
10591071 it ( "should parse CREATE TABLE with quoted name and LIKE" , ( ) => {
1060- const result = parseToAst (
1061- "CREATE TABLE 'my_table' (LIKE other_table)" ,
1062- )
1072+ const result = parseToAst ( "CREATE TABLE 'my_table' (LIKE other_table)" )
10631073 expect ( result . errors ) . toHaveLength ( 0 )
10641074 if ( result . ast [ 0 ] . type === "createTable" ) {
10651075 expect ( result . ast [ 0 ] . table . parts ) . toEqual ( [ "my_table" ] )
@@ -3327,9 +3337,7 @@ orders PIVOT (sum(amount) FOR status IN ('open'))`
33273337 } )
33283338
33293339 it ( "should parse SELECT with star in middle of select list" , ( ) => {
3330- const result = parseToAst (
3331- "SELECT symbol, *, price FROM btc_trades" ,
3332- )
3340+ const result = parseToAst ( "SELECT symbol, *, price FROM btc_trades" )
33333341 expect ( result . errors ) . toHaveLength ( 0 )
33343342 if ( result . ast [ 0 ] . type === "select" ) {
33353343 expect ( result . ast [ 0 ] . columns ) . toHaveLength ( 3 )
@@ -3340,9 +3348,7 @@ orders PIVOT (sum(amount) FOR status IN ('open'))`
33403348 } )
33413349
33423350 it ( "should parse SELECT with multiple expressions before star" , ( ) => {
3343- const result = parseToAst (
3344- "SELECT a, b, c, * FROM t" ,
3345- )
3351+ const result = parseToAst ( "SELECT a, b, c, * FROM t" )
33463352 expect ( result . errors ) . toHaveLength ( 0 )
33473353 if ( result . ast [ 0 ] . type === "select" ) {
33483354 expect ( result . ast [ 0 ] . columns ) . toHaveLength ( 4 )
0 commit comments