@@ -1630,193 +1630,191 @@ test('typegen: go', async () => {
1630
1630
expect ( body ) . toMatchInlineSnapshot ( `
1631
1631
"package database
1632
1632
1633
- import "database/sql"
1634
-
1635
- type PublicUsersSelect struct {
1636
- Id int64 \`json:"id"\`
1637
- Name sql.NullString \`json:"name"\`
1638
- Status sql.NullString \`json:"status"\`
1639
- }
1640
-
1641
- type PublicUsersInsert struct {
1642
- Id sql.NullInt64 \`json:"id"\`
1643
- Name sql.NullString \`json:"name"\`
1644
- Status sql.NullString \`json:"status"\`
1645
- }
1646
-
1647
- type PublicUsersUpdate struct {
1648
- Id sql.NullInt64 \`json:"id"\`
1649
- Name sql.NullString \`json:"name"\`
1650
- Status sql.NullString \`json:"status"\`
1651
- }
1652
-
1653
- type PublicTodosSelect struct {
1654
- Details sql.NullString \`json:"details"\`
1655
- Id int64 \`json:"id"\`
1656
- UserId int64 \`json:"user-id"\`
1657
- }
1658
-
1659
- type PublicTodosInsert struct {
1660
- Details sql.NullString \`json:"details"\`
1661
- Id sql.NullInt64 \`json:"id"\`
1662
- UserId int64 \`json:"user-id"\`
1663
- }
1664
-
1665
- type PublicTodosUpdate struct {
1666
- Details sql.NullString \`json:"details"\`
1667
- Id sql.NullInt64 \`json:"id"\`
1668
- UserId sql.NullInt64 \`json:"user-id"\`
1669
- }
1670
-
1671
- type PublicUsersAuditSelect struct {
1672
- CreatedAt sql.NullString \`json:"created_at"\`
1673
- Id int64 \`json:"id"\`
1674
- PreviousValue interface{} \`json:"previous_value"\`
1675
- UserId sql.NullInt64 \`json:"user_id"\`
1676
- }
1677
-
1678
- type PublicUsersAuditInsert struct {
1679
- CreatedAt sql.NullString \`json:"created_at"\`
1680
- Id sql.NullInt64 \`json:"id"\`
1681
- PreviousValue interface{} \`json:"previous_value"\`
1682
- UserId sql.NullInt64 \`json:"user_id"\`
1683
- }
1684
-
1685
- type PublicUsersAuditUpdate struct {
1686
- CreatedAt sql.NullString \`json:"created_at"\`
1687
- Id sql.NullInt64 \`json:"id"\`
1688
- PreviousValue interface{} \`json:"previous_value"\`
1689
- UserId sql.NullInt64 \`json:"user_id"\`
1690
- }
1691
-
1692
- type PublicUserDetailsSelect struct {
1693
- Details sql.NullString \`json:"details"\`
1694
- UserId int64 \`json:"user_id"\`
1695
- }
1696
-
1697
- type PublicUserDetailsInsert struct {
1698
- Details sql.NullString \`json:"details"\`
1699
- UserId int64 \`json:"user_id"\`
1700
- }
1701
-
1702
- type PublicUserDetailsUpdate struct {
1703
- Details sql.NullString \`json:"details"\`
1704
- UserId sql.NullInt64 \`json:"user_id"\`
1705
- }
1706
-
1707
- type PublicEmptySelect struct {
1708
-
1709
- }
1710
-
1711
- type PublicEmptyInsert struct {
1712
-
1713
- }
1714
-
1715
- type PublicEmptyUpdate struct {
1716
-
1717
- }
1718
-
1719
- type PublicTableWithOtherTablesRowTypeSelect struct {
1720
- Col1 interface{} \`json:"col1"\`
1721
- Col2 interface{} \`json:"col2"\`
1722
- }
1723
-
1724
- type PublicTableWithOtherTablesRowTypeInsert struct {
1725
- Col1 interface{} \`json:"col1"\`
1726
- Col2 interface{} \`json:"col2"\`
1727
- }
1728
-
1729
- type PublicTableWithOtherTablesRowTypeUpdate struct {
1730
- Col1 interface{} \`json:"col1"\`
1731
- Col2 interface{} \`json:"col2"\`
1732
- }
1733
-
1734
- type PublicTableWithPrimaryKeyOtherThanIdSelect struct {
1735
- Name sql.NullString \`json:"name"\`
1736
- OtherId int64 \`json:"other_id"\`
1737
- }
1738
-
1739
- type PublicTableWithPrimaryKeyOtherThanIdInsert struct {
1740
- Name sql.NullString \`json:"name"\`
1741
- OtherId sql.NullInt64 \`json:"other_id"\`
1742
- }
1743
-
1744
- type PublicTableWithPrimaryKeyOtherThanIdUpdate struct {
1745
- Name sql.NullString \`json:"name"\`
1746
- OtherId sql.NullInt64 \`json:"other_id"\`
1747
- }
1748
-
1749
- type PublicCategorySelect struct {
1750
- Id int32 \`json:"id"\`
1751
- Name string \`json:"name"\`
1752
- }
1753
-
1754
- type PublicCategoryInsert struct {
1755
- Id sql.NullInt32 \`json:"id"\`
1756
- Name string \`json:"name"\`
1757
- }
1758
-
1759
- type PublicCategoryUpdate struct {
1760
- Id sql.NullInt32 \`json:"id"\`
1761
- Name sql.NullString \`json:"name"\`
1762
- }
1763
-
1764
- type PublicMemesSelect struct {
1765
- Category sql.NullInt32 \`json:"category"\`
1766
- CreatedAt string \`json:"created_at"\`
1767
- Id int32 \`json:"id"\`
1768
- Metadata interface{} \`json:"metadata"\`
1769
- Name string \`json:"name"\`
1770
- Status sql.NullString \`json:"status"\`
1771
- }
1772
-
1773
- type PublicMemesInsert struct {
1774
- Category sql.NullInt32 \`json:"category"\`
1775
- CreatedAt string \`json:"created_at"\`
1776
- Id sql.NullInt32 \`json:"id"\`
1777
- Metadata interface{} \`json:"metadata"\`
1778
- Name string \`json:"name"\`
1779
- Status sql.NullString \`json:"status"\`
1780
- }
1781
-
1782
- type PublicMemesUpdate struct {
1783
- Category sql.NullInt32 \`json:"category"\`
1784
- CreatedAt sql.NullString \`json:"created_at"\`
1785
- Id sql.NullInt32 \`json:"id"\`
1786
- Metadata interface{} \`json:"metadata"\`
1787
- Name sql.NullString \`json:"name"\`
1788
- Status sql.NullString \`json:"status"\`
1789
- }
1790
-
1791
- type PublicTodosViewSelect struct {
1792
- Details sql.NullString \`json:"details"\`
1793
- Id sql.NullInt64 \`json:"id"\`
1794
- UserId sql.NullInt64 \`json:"user-id"\`
1795
- }
1796
-
1797
- type PublicUsersViewSelect struct {
1798
- Id sql.NullInt64 \`json:"id"\`
1799
- Name sql.NullString \`json:"name"\`
1800
- Status sql.NullString \`json:"status"\`
1801
- }
1802
-
1803
- type PublicAViewSelect struct {
1804
- Id sql.NullInt64 \`json:"id"\`
1805
- }
1806
-
1807
- type PublicTodosMatviewSelect struct {
1808
- Details sql.NullString \`json:"details"\`
1809
- Id sql.NullInt64 \`json:"id"\`
1810
- UserId sql.NullInt64 \`json:"user-id"\`
1811
- }
1812
-
1813
- type PublicCompositeTypeWithArrayAttribute struct {
1814
- MyTextArray interface{} \`json:"my_text_array"\`
1815
- }
1816
-
1817
- type PublicCompositeTypeWithRecordAttribute struct {
1818
- Todo interface{} \`json:"todo"\`
1819
- }"
1633
+ type PublicUsersSelect struct {
1634
+ Id int64 \`json:"id"\`
1635
+ Name *string \`json:"name"\`
1636
+ Status *string \`json:"status"\`
1637
+ }
1638
+
1639
+ type PublicUsersInsert struct {
1640
+ Id *int64 \`json:"id"\`
1641
+ Name *string \`json:"name"\`
1642
+ Status *string \`json:"status"\`
1643
+ }
1644
+
1645
+ type PublicUsersUpdate struct {
1646
+ Id *int64 \`json:"id"\`
1647
+ Name *string \`json:"name"\`
1648
+ Status *string \`json:"status"\`
1649
+ }
1650
+
1651
+ type PublicTodosSelect struct {
1652
+ Details *string \`json:"details"\`
1653
+ Id int64 \`json:"id"\`
1654
+ UserId int64 \`json:"user-id"\`
1655
+ }
1656
+
1657
+ type PublicTodosInsert struct {
1658
+ Details *string \`json:"details"\`
1659
+ Id *int64 \`json:"id"\`
1660
+ UserId int64 \`json:"user-id"\`
1661
+ }
1662
+
1663
+ type PublicTodosUpdate struct {
1664
+ Details *string \`json:"details"\`
1665
+ Id *int64 \`json:"id"\`
1666
+ UserId *int64 \`json:"user-id"\`
1667
+ }
1668
+
1669
+ type PublicUsersAuditSelect struct {
1670
+ CreatedAt *string \`json:"created_at"\`
1671
+ Id int64 \`json:"id"\`
1672
+ PreviousValue interface{} \`json:"previous_value"\`
1673
+ UserId *int64 \`json:"user_id"\`
1674
+ }
1675
+
1676
+ type PublicUsersAuditInsert struct {
1677
+ CreatedAt *string \`json:"created_at"\`
1678
+ Id *int64 \`json:"id"\`
1679
+ PreviousValue interface{} \`json:"previous_value"\`
1680
+ UserId *int64 \`json:"user_id"\`
1681
+ }
1682
+
1683
+ type PublicUsersAuditUpdate struct {
1684
+ CreatedAt *string \`json:"created_at"\`
1685
+ Id *int64 \`json:"id"\`
1686
+ PreviousValue interface{} \`json:"previous_value"\`
1687
+ UserId *int64 \`json:"user_id"\`
1688
+ }
1689
+
1690
+ type PublicUserDetailsSelect struct {
1691
+ Details *string \`json:"details"\`
1692
+ UserId int64 \`json:"user_id"\`
1693
+ }
1694
+
1695
+ type PublicUserDetailsInsert struct {
1696
+ Details *string \`json:"details"\`
1697
+ UserId int64 \`json:"user_id"\`
1698
+ }
1699
+
1700
+ type PublicUserDetailsUpdate struct {
1701
+ Details *string \`json:"details"\`
1702
+ UserId *int64 \`json:"user_id"\`
1703
+ }
1704
+
1705
+ type PublicEmptySelect struct {
1706
+
1707
+ }
1708
+
1709
+ type PublicEmptyInsert struct {
1710
+
1711
+ }
1712
+
1713
+ type PublicEmptyUpdate struct {
1714
+
1715
+ }
1716
+
1717
+ type PublicTableWithOtherTablesRowTypeSelect struct {
1718
+ Col1 interface{} \`json:"col1"\`
1719
+ Col2 interface{} \`json:"col2"\`
1720
+ }
1721
+
1722
+ type PublicTableWithOtherTablesRowTypeInsert struct {
1723
+ Col1 interface{} \`json:"col1"\`
1724
+ Col2 interface{} \`json:"col2"\`
1725
+ }
1726
+
1727
+ type PublicTableWithOtherTablesRowTypeUpdate struct {
1728
+ Col1 interface{} \`json:"col1"\`
1729
+ Col2 interface{} \`json:"col2"\`
1730
+ }
1731
+
1732
+ type PublicTableWithPrimaryKeyOtherThanIdSelect struct {
1733
+ Name *string \`json:"name"\`
1734
+ OtherId int64 \`json:"other_id"\`
1735
+ }
1736
+
1737
+ type PublicTableWithPrimaryKeyOtherThanIdInsert struct {
1738
+ Name *string \`json:"name"\`
1739
+ OtherId *int64 \`json:"other_id"\`
1740
+ }
1741
+
1742
+ type PublicTableWithPrimaryKeyOtherThanIdUpdate struct {
1743
+ Name *string \`json:"name"\`
1744
+ OtherId *int64 \`json:"other_id"\`
1745
+ }
1746
+
1747
+ type PublicCategorySelect struct {
1748
+ Id int32 \`json:"id"\`
1749
+ Name string \`json:"name"\`
1750
+ }
1751
+
1752
+ type PublicCategoryInsert struct {
1753
+ Id *int32 \`json:"id"\`
1754
+ Name string \`json:"name"\`
1755
+ }
1756
+
1757
+ type PublicCategoryUpdate struct {
1758
+ Id *int32 \`json:"id"\`
1759
+ Name *string \`json:"name"\`
1760
+ }
1761
+
1762
+ type PublicMemesSelect struct {
1763
+ Category *int32 \`json:"category"\`
1764
+ CreatedAt string \`json:"created_at"\`
1765
+ Id int32 \`json:"id"\`
1766
+ Metadata interface{} \`json:"metadata"\`
1767
+ Name string \`json:"name"\`
1768
+ Status *string \`json:"status"\`
1769
+ }
1770
+
1771
+ type PublicMemesInsert struct {
1772
+ Category *int32 \`json:"category"\`
1773
+ CreatedAt string \`json:"created_at"\`
1774
+ Id *int32 \`json:"id"\`
1775
+ Metadata interface{} \`json:"metadata"\`
1776
+ Name string \`json:"name"\`
1777
+ Status *string \`json:"status"\`
1778
+ }
1779
+
1780
+ type PublicMemesUpdate struct {
1781
+ Category *int32 \`json:"category"\`
1782
+ CreatedAt *string \`json:"created_at"\`
1783
+ Id *int32 \`json:"id"\`
1784
+ Metadata interface{} \`json:"metadata"\`
1785
+ Name *string \`json:"name"\`
1786
+ Status *string \`json:"status"\`
1787
+ }
1788
+
1789
+ type PublicTodosViewSelect struct {
1790
+ Details *string \`json:"details"\`
1791
+ Id *int64 \`json:"id"\`
1792
+ UserId *int64 \`json:"user-id"\`
1793
+ }
1794
+
1795
+ type PublicUsersViewSelect struct {
1796
+ Id *int64 \`json:"id"\`
1797
+ Name *string \`json:"name"\`
1798
+ Status *string \`json:"status"\`
1799
+ }
1800
+
1801
+ type PublicAViewSelect struct {
1802
+ Id *int64 \`json:"id"\`
1803
+ }
1804
+
1805
+ type PublicTodosMatviewSelect struct {
1806
+ Details *string \`json:"details"\`
1807
+ Id *int64 \`json:"id"\`
1808
+ UserId *int64 \`json:"user-id"\`
1809
+ }
1810
+
1811
+ type PublicCompositeTypeWithArrayAttribute struct {
1812
+ MyTextArray interface{} \`json:"my_text_array"\`
1813
+ }
1814
+
1815
+ type PublicCompositeTypeWithRecordAttribute struct {
1816
+ Todo interface{} \`json:"todo"\`
1817
+ }"
1820
1818
` )
1821
1819
} )
1822
1820
0 commit comments