@@ -333,31 +333,31 @@ test('typegen: typescript', async () => {
333333 Functions: {
334334 blurb: {
335335 Args: {
336- "": unknown
336+ "": Database["public"]["Tables"]["todos"]["Row"]
337337 }
338338 Returns: string
339339 }
340340 blurb_varchar: {
341341 Args: {
342- "": unknown
342+ "": Database["public"]["Tables"]["todos"]["Row"]
343343 }
344344 Returns: string
345345 }
346346 details_is_long: {
347347 Args: {
348- "": unknown
348+ "": Database["public"]["Tables"]["todos"]["Row"]
349349 }
350350 Returns: boolean
351351 }
352352 details_length: {
353353 Args: {
354- "": unknown
354+ "": Database["public"]["Tables"]["todos"]["Row"]
355355 }
356356 Returns: number
357357 }
358358 details_words: {
359359 Args: {
360- "": unknown
360+ "": Database["public"]["Tables"]["todos"]["Row"]
361361 }
362362 Returns: string[]
363363 }
@@ -424,6 +424,9 @@ test('typegen: typescript', async () => {
424424 composite_type_with_array_attribute: {
425425 my_text_array: string[] | null
426426 }
427+ composite_type_with_record_attribute: {
428+ todo: Database["public"]["Tables"]["todos"]["Row"] | null
429+ }
427430 }
428431 }
429432 }
@@ -877,31 +880,31 @@ test('typegen w/ one-to-one relationships', async () => {
877880 Functions: {
878881 blurb: {
879882 Args: {
880- "": unknown
883+ "": Database["public"]["Tables"]["todos"]["Row"]
881884 }
882885 Returns: string
883886 }
884887 blurb_varchar: {
885888 Args: {
886- "": unknown
889+ "": Database["public"]["Tables"]["todos"]["Row"]
887890 }
888891 Returns: string
889892 }
890893 details_is_long: {
891894 Args: {
892- "": unknown
895+ "": Database["public"]["Tables"]["todos"]["Row"]
893896 }
894897 Returns: boolean
895898 }
896899 details_length: {
897900 Args: {
898- "": unknown
901+ "": Database["public"]["Tables"]["todos"]["Row"]
899902 }
900903 Returns: number
901904 }
902905 details_words: {
903906 Args: {
904- "": unknown
907+ "": Database["public"]["Tables"]["todos"]["Row"]
905908 }
906909 Returns: string[]
907910 }
@@ -968,6 +971,9 @@ test('typegen w/ one-to-one relationships', async () => {
968971 composite_type_with_array_attribute: {
969972 my_text_array: string[] | null
970973 }
974+ composite_type_with_record_attribute: {
975+ todo: Database["public"]["Tables"]["todos"]["Row"] | null
976+ }
971977 }
972978 }
973979 }
@@ -1421,31 +1427,31 @@ test('typegen: typescript w/ one-to-one relationships', async () => {
14211427 Functions: {
14221428 blurb: {
14231429 Args: {
1424- "": unknown
1430+ "": Database["public"]["Tables"]["todos"]["Row"]
14251431 }
14261432 Returns: string
14271433 }
14281434 blurb_varchar: {
14291435 Args: {
1430- "": unknown
1436+ "": Database["public"]["Tables"]["todos"]["Row"]
14311437 }
14321438 Returns: string
14331439 }
14341440 details_is_long: {
14351441 Args: {
1436- "": unknown
1442+ "": Database["public"]["Tables"]["todos"]["Row"]
14371443 }
14381444 Returns: boolean
14391445 }
14401446 details_length: {
14411447 Args: {
1442- "": unknown
1448+ "": Database["public"]["Tables"]["todos"]["Row"]
14431449 }
14441450 Returns: number
14451451 }
14461452 details_words: {
14471453 Args: {
1448- "": unknown
1454+ "": Database["public"]["Tables"]["todos"]["Row"]
14491455 }
14501456 Returns: string[]
14511457 }
@@ -1512,6 +1518,9 @@ test('typegen: typescript w/ one-to-one relationships', async () => {
15121518 composite_type_with_array_attribute: {
15131519 my_text_array: string[] | null
15141520 }
1521+ composite_type_with_record_attribute: {
1522+ todo: Database["public"]["Tables"]["todos"]["Row"] | null
1523+ }
15151524 }
15161525 }
15171526 }
@@ -1803,6 +1812,10 @@ test('typegen: go', async () => {
18031812
18041813 type PublicCompositeTypeWithArrayAttribute struct {
18051814 MyTextArray interface{} \`json:"my_text_array"\`
1815+ }
1816+
1817+ type PublicCompositeTypeWithRecordAttribute struct {
1818+ Todo interface{} \`json:"todo"\`
18061819 }"
18071820 ` )
18081821} )
@@ -2144,6 +2157,12 @@ test('typegen: swift', async () => {
21442157 case MyTextArray = "my_text_array"
21452158 }
21462159 }
2160+ internal struct CompositeTypeWithRecordAttribute: Codable, Hashable, Sendable {
2161+ internal let Todo: TodosSelect
2162+ internal enum CodingKeys: String, CodingKey {
2163+ case Todo = "todo"
2164+ }
2165+ }
21472166 }"
21482167 ` )
21492168} )
@@ -2489,6 +2508,12 @@ test('typegen: swift w/ public access control', async () => {
24892508 case MyTextArray = "my_text_array"
24902509 }
24912510 }
2511+ public struct CompositeTypeWithRecordAttribute: Codable, Hashable, Sendable {
2512+ public let Todo: TodosSelect
2513+ public enum CodingKeys: String, CodingKey {
2514+ case Todo = "todo"
2515+ }
2516+ }
24922517 }"
24932518 ` )
24942519} )
0 commit comments