@@ -370,9 +370,9 @@ test("inner join", async () => {
370370 await tx . execute ( sql `INSERT INTO pets (name, owner_id) VALUES ('Rex', 1), ('Fido', 2), ('Buddy', 1)` ) ;
371371
372372 class Owners extends db . Table ( "owners" ) {
373- id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; name = ( Text < 1 > ) . column ( { nonNull : true } ) ; }
373+ id = Int8 . column ( { nonNull : true } ) ; name = Text . column ( { nonNull : true } ) ; }
374374 class Pets extends db . Table ( "pets" ) {
375- id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; name = ( Text < 1 > ) . column ( { nonNull : true } ) ; owner_id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; }
375+ id = Int8 . column ( { nonNull : true } ) ; name = Text . column ( { nonNull : true } ) ; owner_id = Int8 . column ( { nonNull : true } ) ; }
376376
377377 const rows = await tx . execute ( Pets . from ( )
378378 . join ( Owners , ( { pets, owners } ) => pets . owner_id [ "=" ] ( owners . id ) )
@@ -406,9 +406,9 @@ test("left join — unmatched rows return null", async () => {
406406 await tx . execute ( sql `INSERT INTO books (title, author_id) VALUES ('Book A', 1)` ) ;
407407
408408 class Authors extends db . Table ( "authors" ) {
409- id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; name = ( Text < 1 > ) . column ( { nonNull : true } ) ; }
409+ id = Int8 . column ( { nonNull : true } ) ; name = Text . column ( { nonNull : true } ) ; }
410410 class Books extends db . Table ( "books" ) {
411- id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; title = ( Text < 1 > ) . column ( { nonNull : true } ) ; author_id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; }
411+ id = Int8 . column ( { nonNull : true } ) ; title = Text . column ( { nonNull : true } ) ; author_id = Int8 . column ( { nonNull : true } ) ; }
412412
413413 const rows = await tx . execute ( Authors . from ( )
414414 . leftJoin ( Books , ( { authors, books } ) => authors . id [ "=" ] ( books . author_id ) )
@@ -441,9 +441,9 @@ test("join with where on joined table", async () => {
441441 await tx . execute ( sql `INSERT INTO employees (name, dept_id) VALUES ('Alice', 1), ('Bob', 1), ('Carol', 2)` ) ;
442442
443443 class Departments extends db . Table ( "departments" ) {
444- id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; name = ( Text < 1 > ) . column ( { nonNull : true } ) ; }
444+ id = Int8 . column ( { nonNull : true } ) ; name = Text . column ( { nonNull : true } ) ; }
445445 class Employees extends db . Table ( "employees" ) {
446- id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; name = ( Text < 1 > ) . column ( { nonNull : true } ) ; dept_id = ( Int8 < 0 | 1 > ) . column ( ) ; }
446+ id = Int8 . column ( { nonNull : true } ) ; name = Text . column ( { nonNull : true } ) ; dept_id = Int8 . column ( ) ; }
447447
448448 const rows = await tx . execute ( Departments . from ( )
449449 . join ( Employees , ( { departments, employees } ) => departments . id [ "=" ] ( employees . dept_id ) )
@@ -479,9 +479,9 @@ test("scalar with cardinality 'one'", async () => {
479479 await tx . execute ( sql `INSERT INTO books (title, author_id) VALUES ('Book A', 1), ('Book B', 1)` ) ;
480480
481481 class Authors extends db . Table ( "authors" ) {
482- id = ( Int8 < 1 > ) . column ( { nonNull : true , generated : true } ) ; name = ( Text < 1 > ) . column ( { nonNull : true } ) ; }
482+ id = Int8 . column ( { nonNull : true , generated : true } ) ; name = Text . column ( { nonNull : true } ) ; }
483483 class Books extends db . Table ( "books" ) {
484- id = ( Int8 < 1 > ) . column ( { nonNull : true , generated : true } ) ; title = ( Text < 1 > ) . column ( { nonNull : true } ) ; author_id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; }
484+ id = Int8 . column ( { nonNull : true , generated : true } ) ; title = Text . column ( { nonNull : true } ) ; author_id = Int8 . column ( { nonNull : true } ) ; }
485485
486486 // Scalar subquery: get author for a book (cardinality 'one')
487487 const rows = await tx . execute ( Books . from ( )
@@ -518,9 +518,9 @@ test("scalar with cardinality 'maybe' — null when no match", async () => {
518518 await tx . execute ( sql `INSERT INTO profiles (person_id, bio) VALUES (1, 'Hello')` ) ;
519519
520520 class People extends db . Table ( "people" ) {
521- id = ( Int8 < 1 > ) . column ( { nonNull : true , generated : true } ) ; name = ( Text < 1 > ) . column ( { nonNull : true } ) ; }
521+ id = Int8 . column ( { nonNull : true , generated : true } ) ; name = Text . column ( { nonNull : true } ) ; }
522522 class Profiles extends db . Table ( "profiles" ) {
523- id = ( Int8 < 1 > ) . column ( { nonNull : true , generated : true } ) ; person_id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; bio = ( Text < 1 > ) . column ( { nonNull : true } ) ; }
523+ id = Int8 . column ( { nonNull : true , generated : true } ) ; person_id = Int8 . column ( { nonNull : true } ) ; bio = Text . column ( { nonNull : true } ) ; }
524524
525525 const rows = await tx . execute ( People . from ( )
526526 . select ( ( { people } ) => ( {
@@ -560,9 +560,9 @@ test("scalar with cardinality 'many' — array result", async () => {
560560 await tx . execute ( sql `INSERT INTO children (name, parent_id) VALUES ('Charlie', 1), ('Diana', 1)` ) ;
561561
562562 class Parents extends db . Table ( "parents" ) {
563- id = ( Int8 < 1 > ) . column ( { nonNull : true , generated : true } ) ; name = ( Text < 1 > ) . column ( { nonNull : true } ) ; }
563+ id = Int8 . column ( { nonNull : true , generated : true } ) ; name = Text . column ( { nonNull : true } ) ; }
564564 class Children extends db . Table ( "children" ) {
565- id = ( Int8 < 1 > ) . column ( { nonNull : true , generated : true } ) ; name = ( Text < 1 > ) . column ( { nonNull : true } ) ; parent_id = ( Int8 < 1 > ) . column ( { nonNull : true } ) ; }
565+ id = Int8 . column ( { nonNull : true , generated : true } ) ; name = Text . column ( { nonNull : true } ) ; parent_id = Int8 . column ( { nonNull : true } ) ; }
566566
567567 const rows = await tx . execute ( Parents . from ( )
568568 . select ( ( { parents } ) => ( {
@@ -861,9 +861,9 @@ test("type test: conn.execute(Table.from()) row methods are never-typed (uncalla
861861
862862 class Widgets extends db . Table ( "widgets" ) {
863863 @expose ( )
864- id = ( Int8 < 1 > ) . column ( { nonNull : true , generated : true } ) ;
864+ id = Int8 . column ( { nonNull : true , generated : true } ) ;
865865 @expose ( )
866- name = ( Text < 1 > ) . column ( { nonNull : true } ) ;
866+ name = Text . column ( { nonNull : true } ) ;
867867
868868 // Plain method — should not be a callable function on the row type.
869869 doStuff ( ) : string {
0 commit comments