You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 13, 2023. It is now read-only.
@@ -75,6 +76,22 @@ class PostgrestBuilder<T> implements Future<T?> {
75
76
.._converter = converter;
76
77
}
77
78
79
+
void_assertCorrectGeneric(TypeR) {
80
+
assert(
81
+
R==PostgrestList||
82
+
R==PostgrestMap||
83
+
R== (_Nullable<PostgrestMap>) ||
84
+
R==PostgrestListResponse||
85
+
R==PostgrestMapResponse||
86
+
R== (PostgrestResponse<PostgrestMap?>) ||
87
+
R==PostgrestResponse||
88
+
R==List||
89
+
R== (List<Map>) ||
90
+
R==Map||
91
+
R==dynamic,
92
+
"$R is not allowed as generic for `select<R>()`. Allowed types are: `PostgrestList`, `PostgrestMap`, `PostgrestMap?`, `PostgrestListResponse`, `PostgrestMapResponse`, `PostgrestResponse`, `dynamic`.");
93
+
}
94
+
78
95
/// Sends the request and returns a [PostgrestResponse]
79
96
///
80
97
/// [head] to trigger a HEAD request
@@ -92,7 +109,7 @@ class PostgrestBuilder<T> implements Future<T?> {
92
109
/// }
93
110
/// ```
94
111
@Deprecated('Use async/await or .then instead. Deprecated in 0.2.0')
95
-
Future<PostgrestResponse<T>> execute({
112
+
Future<PostgrestResponse> execute({
96
113
bool head =false,
97
114
CountOption? count,
98
115
}) async {
@@ -103,7 +120,7 @@ class PostgrestBuilder<T> implements Future<T?> {
103
120
return_execute();
104
121
}
105
122
106
-
Future<PostgrestResponse<T>> _execute() async {
123
+
Future<PostgrestResponse> _execute() async {
107
124
if (_options?.head ??false) {
108
125
_method =METHOD_HEAD;
109
126
}
@@ -183,7 +200,7 @@ class PostgrestBuilder<T> implements Future<T?> {
183
200
}
184
201
185
202
/// Parse request response to json object if possible
0 commit comments