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

Function testPostgreSQLTypes

adapter/cockroachdb/cockroachdb_test.go:223–594  ·  view source on GitHub ↗
(t *testing.T, sess db.Session)

Source from the content-addressed store, hash-verified

221}
222
223func testPostgreSQLTypes(t *testing.T, sess db.Session) {
224 type PGTypeInline struct {
225 IntegerArrayPtr *Int64Array `db:"integer_array_ptr,omitempty"`
226 StringArrayPtr *StringArray `db:"string_array_ptr,omitempty"`
227 JSONBMapPtr *JSONBMap `db:"jsonb_map_ptr,omitempty"`
228 }
229
230 type PGTypeAutoInline struct {
231 AutoIntegerArray []int64 `db:"auto_integer_array"`
232 AutoStringArray []string `db:"auto_string_array"`
233 AutoJSONBMap map[string]interface{} `db:"auto_jsonb_map"`
234 AutoJSONBMapString map[string]interface{} `db:"auto_jsonb_map_string"`
235 AutoJSONBMapInteger map[string]interface{} `db:"auto_jsonb_map_integer"`
236 }
237
238 type PGType struct {
239 ID int64 `db:"id,omitempty"`
240
241 UInt8Value uint8Compat `db:"uint8_value"`
242 UInt8ValueArray uint8CompatArray `db:"uint8_value_array"`
243
244 Int64Value int64Compat `db:"int64_value"`
245 Int64ValueArray *int64CompatArray `db:"int64_value_array"`
246
247 IntegerArray Int64Array `db:"integer_array"`
248 StringArray StringArray `db:"string_array,stringarray"`
249 JSONBMap JSONBMap `db:"jsonb_map"`
250
251 PGTypeInline `db:",inline"`
252
253 PGTypeAutoInline `db:",inline"`
254
255 JSONBObject JSONB `db:"jsonb_object"`
256 JSONBArray JSONBArray `db:"jsonb_array"`
257
258 CustomJSONBObject customJSONB `db:"custom_jsonb_object"`
259 AutoCustomJSONBObject customJSONB `db:"auto_custom_jsonb_object"`
260
261 CustomJSONBObjectPtr *customJSONB `db:"custom_jsonb_object_ptr,omitempty"`
262 AutoCustomJSONBObjectPtr *customJSONB `db:"auto_custom_jsonb_object_ptr,omitempty"`
263
264 AutoCustomJSONBObjectArray *customJSONBObjectArray `db:"auto_custom_jsonb_object_array"`
265 AutoCustomJSONBObjectMap *customJSONBObjectMap `db:"auto_custom_jsonb_object_map"`
266
267 StringValue string `db:"string_value"`
268 IntegerValue int64 `db:"integer_value"`
269 VarcharValue string `db:"varchar_value"`
270 DecimalValue float64 `db:"decimal_value"`
271
272 Int64CompatValue int64Compat `db:"integer_compat_value"`
273 UIntCompatValue uintCompat `db:"uinteger_compat_value"`
274 StringCompatValue stringCompat `db:"string_compat_value"`
275
276 Int64CompatValueJSONBArray JSONBArray `db:"integer_compat_value_jsonb_array"`
277 UIntCompatValueJSONBArray JSONBArray `db:"uinteger_compat_value_jsonb_array"`
278 StringCompatValueJSONBArray JSONBArray `db:"string_compat_value_jsonb_array"`
279
280 StringValuePtr *string `db:"string_value_ptr,omitempty"`

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