MCPcopy Index your code
hub / github.com/upper/db / testPostgreSQLTypes

Function testPostgreSQLTypes

adapter/postgresql/postgresql_test.go:204–587  ·  view source on GitHub ↗
(t *testing.T, sess db.Session)

Source from the content-addressed store, hash-verified

202}
203
204func testPostgreSQLTypes(t *testing.T, sess db.Session) {
205 type PGTypeInline struct {
206 IntegerArrayPtr *Int64Array `db:"integer_array_ptr,omitempty"`
207 StringArrayPtr *StringArray `db:"string_array_ptr,omitempty"`
208 JSONBMapPtr *JSONBMap `db:"jsonb_map_ptr,omitempty"`
209 }
210
211 type PGTypeAutoInline struct {
212 AutoIntegerArray []int64 `db:"auto_integer_array"`
213 AutoStringArray []string `db:"auto_string_array"`
214 AutoJSONBMap map[string]interface{} `db:"auto_jsonb_map"`
215 AutoJSONBMapString map[string]interface{} `db:"auto_jsonb_map_string"`
216 AutoJSONBMapInteger map[string]interface{} `db:"auto_jsonb_map_integer"`
217 }
218
219 type PGType struct {
220 ID int64 `db:"id,omitempty"`
221
222 UInt8Value uint8Compat `db:"uint8_value"`
223 UInt8ValueArray uint8CompatArray `db:"uint8_value_array"`
224
225 Int64Value int64Compat `db:"int64_value"`
226 Int64ValueArray *int64CompatArray `db:"int64_value_array"`
227
228 IntegerArray Int64Array `db:"integer_array"`
229 StringArray StringArray `db:"string_array,stringarray"`
230 JSONBMap JSONBMap `db:"jsonb_map"`
231
232 RawJSONBMap *json.RawMessage `db:"raw_jsonb_map,omitempty"`
233 RawJSONBText *json.RawMessage `db:"raw_jsonb_text,omitempty"`
234
235 PGTypeInline `db:",inline"`
236
237 PGTypeAutoInline `db:",inline"`
238
239 JSONBObject JSONB `db:"jsonb_object"`
240 JSONBArray JSONBArray `db:"jsonb_array"`
241
242 CustomJSONBObject customJSONB `db:"custom_jsonb_object"`
243 AutoCustomJSONBObject customJSONB `db:"auto_custom_jsonb_object"`
244
245 CustomJSONBObjectPtr *customJSONB `db:"custom_jsonb_object_ptr,omitempty"`
246 AutoCustomJSONBObjectPtr *customJSONB `db:"auto_custom_jsonb_object_ptr,omitempty"`
247
248 AutoCustomJSONBObjectArray *customJSONBObjectArray `db:"auto_custom_jsonb_object_array"`
249 AutoCustomJSONBObjectMap *customJSONBObjectMap `db:"auto_custom_jsonb_object_map"`
250
251 StringValue string `db:"string_value"`
252 IntegerValue int64 `db:"integer_value"`
253 VarcharValue string `db:"varchar_value"`
254 DecimalValue float64 `db:"decimal_value"`
255
256 Int64CompatValue int64Compat `db:"integer_compat_value"`
257 UIntCompatValue uintCompat `db:"uinteger_compat_value"`
258 StringCompatValue stringCompat `db:"string_compat_value"`
259
260 Int64CompatValueJSONBArray JSONBArray `db:"integer_compat_value_jsonb_array"`
261 UIntCompatValueJSONBArray JSONBArray `db:"uinteger_compat_value_jsonb_array"`

Callers 2

Calls 15

JSONBArrayTypeAlias · 0.70
InsertMethod · 0.65
CollectionMethod · 0.65
OneMethod · 0.65
FindMethod · 0.65
IDMethod · 0.65
QueryRowMethod · 0.65
ReturningMethod · 0.65
ValuesMethod · 0.65
InsertIntoMethod · 0.65
SQLMethod · 0.65
ScanMethod · 0.65

Tested by

no test coverage detected