MCPcopy Index your code
hub / github.com/go-dev-frame/sponge / Test_parseOption

Function Test_parseOption

pkg/sql2code/parser/parser_test.go:267–285  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

265}
266
267func Test_parseOption(t *testing.T) {
268 opts := []Option{
269 WithDBDriver("foo"),
270 WithFieldTypes(map[string]string{"foo": "bar"}),
271 WithCharset("foo"),
272 WithCollation("foo"),
273 WithTablePrefix("foo"),
274 WithColumnPrefix("foo"),
275 WithJSONTag(1),
276 WithNoNullType(),
277 WithNullStyle(1),
278 WithPackage("model"),
279 WithGormType(),
280 WithForceTableName(),
281 WithEmbed(),
282 }
283 o := parseOption(opts)
284 assert.NotNil(t, o)
285}
286
287func Test_mysqlToGoType(t *testing.T) {
288 fields := []*types.FieldType{

Callers

nothing calls this directly

Calls 14

WithDBDriverFunction · 0.85
WithFieldTypesFunction · 0.85
WithCharsetFunction · 0.85
WithCollationFunction · 0.85
WithTablePrefixFunction · 0.85
WithColumnPrefixFunction · 0.85
WithJSONTagFunction · 0.85
WithNoNullTypeFunction · 0.85
WithNullStyleFunction · 0.85
WithPackageFunction · 0.85
WithGormTypeFunction · 0.85
WithForceTableNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…