@supabase/postgrest-js 3.0.0-next.4 → 3.0.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/PostgrestFilterBuilder.ts +35 -2
- package/src/version.ts +1 -1
package/package.json
CHANGED
|
@@ -76,6 +76,22 @@ type ResolveFilterRelationshipValue<
|
|
|
76
76
|
|
|
77
77
|
export type InvalidMethodError<S extends string> = { Error: S }
|
|
78
78
|
|
|
79
|
+
type NonNullableColumn<T extends Record<string, unknown>, Col extends string> = Col extends keyof T
|
|
80
|
+
? { [K in keyof T]: K extends Col ? NonNullable<T[K]> : T[K] }
|
|
81
|
+
: T
|
|
82
|
+
|
|
83
|
+
type NarrowResultColumn<T, Col extends string> = T extends (infer Item)[]
|
|
84
|
+
? Item extends Record<string, unknown>
|
|
85
|
+
? Col extends keyof Item
|
|
86
|
+
? { [K in keyof Item]: K extends Col ? NonNullable<Item[K]> : Item[K] }[]
|
|
87
|
+
: T
|
|
88
|
+
: T
|
|
89
|
+
: T extends Record<string, unknown>
|
|
90
|
+
? Col extends keyof T
|
|
91
|
+
? { [K in keyof T]: K extends Col ? NonNullable<T[K]> : T[K] }
|
|
92
|
+
: T
|
|
93
|
+
: T
|
|
94
|
+
|
|
79
95
|
export default class PostgrestFilterBuilder<
|
|
80
96
|
ClientOptions extends ClientServerOptions,
|
|
81
97
|
Schema extends GenericSchema,
|
|
@@ -1719,6 +1735,19 @@ export default class PostgrestFilterBuilder<
|
|
|
1719
1735
|
return this
|
|
1720
1736
|
}
|
|
1721
1737
|
|
|
1738
|
+
not<ColumnName extends string & keyof Row>(
|
|
1739
|
+
column: ColumnName,
|
|
1740
|
+
operator: 'is',
|
|
1741
|
+
value: null
|
|
1742
|
+
): PostgrestFilterBuilder<
|
|
1743
|
+
ClientOptions,
|
|
1744
|
+
Schema,
|
|
1745
|
+
NonNullableColumn<Row, ColumnName>,
|
|
1746
|
+
NarrowResultColumn<Result, ColumnName>,
|
|
1747
|
+
RelationName,
|
|
1748
|
+
Relationships,
|
|
1749
|
+
Method
|
|
1750
|
+
>
|
|
1722
1751
|
not<ColumnName extends string & keyof Row>(
|
|
1723
1752
|
column: ColumnName,
|
|
1724
1753
|
operator: FilterOperator,
|
|
@@ -1783,9 +1812,13 @@ export default class PostgrestFilterBuilder<
|
|
|
1783
1812
|
*
|
|
1784
1813
|
* ```
|
|
1785
1814
|
*/
|
|
1786
|
-
not(
|
|
1815
|
+
not(
|
|
1816
|
+
column: string,
|
|
1817
|
+
operator: string,
|
|
1818
|
+
value: unknown
|
|
1819
|
+
): PostgrestFilterBuilder<ClientOptions, Schema, any, any, RelationName, Relationships, Method> {
|
|
1787
1820
|
this.url.searchParams.append(column, `not.${operator}.${value}`)
|
|
1788
|
-
return this
|
|
1821
|
+
return this as any
|
|
1789
1822
|
}
|
|
1790
1823
|
|
|
1791
1824
|
/**
|
package/src/version.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// - Debugging and support (identifying which version is running)
|
|
5
5
|
// - Telemetry and logging (version reporting in errors/analytics)
|
|
6
6
|
// - Ensuring build artifacts match the published package version
|
|
7
|
-
export const version = '3.0.0-next.
|
|
7
|
+
export const version = '3.0.0-next.6'
|