diff --git a/entc/gen/bindata.go b/entc/gen/bindata.go index e47507db1..7d3c595a7 100644 --- a/entc/gen/bindata.go +++ b/entc/gen/bindata.go @@ -1,4 +1,4 @@ -// Code generated by go-bindata. (@generated) DO NOT EDIT. +// Package gen Code generated by go-bindata. (@generated) DO NOT EDIT. // sources: // template/base.tmpl // template/builder/create.tmpl @@ -74,21 +74,32 @@ type bindataFileInfo struct { modTime time.Time } +// Name return file name func (fi bindataFileInfo) Name() string { return fi.name } + +// Size return file size func (fi bindataFileInfo) Size() int64 { return fi.size } + +// Mode return file mode func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } + +// Mode return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } + +// IsDir return file whether a directory func (fi bindataFileInfo) IsDir() bool { - return false + return fi.mode&os.ModeDir != 0 } + +// Sys return file is sys mode func (fi bindataFileInfo) Sys() interface{} { return nil } @@ -108,7 +119,7 @@ func templateBaseTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/base.tmpl", size: 7712, mode: os.FileMode(420), modTime: time.Unix(1562276292, 0)} + info := bindataFileInfo{name: "template/base.tmpl", size: 7712, mode: os.FileMode(420), modTime: time.Unix(1562258189, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -128,7 +139,7 @@ func templateBuilderCreateTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/builder/create.tmpl", size: 2706, mode: os.FileMode(420), modTime: time.Unix(1558503319, 0)} + info := bindataFileInfo{name: "template/builder/create.tmpl", size: 2706, mode: os.FileMode(420), modTime: time.Unix(1560858190, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -148,7 +159,7 @@ func templateBuilderDeleteTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/builder/delete.tmpl", size: 1903, mode: os.FileMode(420), modTime: time.Unix(1558503319, 0)} + info := bindataFileInfo{name: "template/builder/delete.tmpl", size: 1903, mode: os.FileMode(420), modTime: time.Unix(1560858192, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -168,7 +179,7 @@ func templateBuilderQueryTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/builder/query.tmpl", size: 13758, mode: os.FileMode(420), modTime: time.Unix(1563488473, 0)} + info := bindataFileInfo{name: "template/builder/query.tmpl", size: 13758, mode: os.FileMode(420), modTime: time.Unix(1563273173, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -188,7 +199,7 @@ func templateBuilderSetterTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/builder/setter.tmpl", size: 2911, mode: os.FileMode(420), modTime: time.Unix(1555862705, 0)} + info := bindataFileInfo{name: "template/builder/setter.tmpl", size: 2911, mode: os.FileMode(420), modTime: time.Unix(1560858191, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -208,7 +219,7 @@ func templateBuilderUpdateTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/builder/update.tmpl", size: 7109, mode: os.FileMode(420), modTime: time.Unix(1558503319, 0)} + info := bindataFileInfo{name: "template/builder/update.tmpl", size: 7109, mode: os.FileMode(420), modTime: time.Unix(1560858190, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -228,7 +239,7 @@ func templateClientTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/client.tmpl", size: 5596, mode: os.FileMode(420), modTime: time.Unix(1558976196, 0)} + info := bindataFileInfo{name: "template/client.tmpl", size: 5596, mode: os.FileMode(420), modTime: time.Unix(1560858192, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -248,7 +259,7 @@ func templateConfigTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/config.tmpl", size: 1080, mode: os.FileMode(420), modTime: time.Unix(1558503319, 0)} + info := bindataFileInfo{name: "template/config.tmpl", size: 1080, mode: os.FileMode(420), modTime: time.Unix(1560858192, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -268,7 +279,7 @@ func templateContextTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/context.tmpl", size: 526, mode: os.FileMode(420), modTime: time.Unix(1563488473, 0)} + info := bindataFileInfo{name: "template/context.tmpl", size: 526, mode: os.FileMode(420), modTime: time.Unix(1563110970, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -288,7 +299,7 @@ func templateDialectGremlinCreateTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/gremlin/create.tmpl", size: 2567, mode: os.FileMode(420), modTime: time.Unix(1558503319, 0)} + info := bindataFileInfo{name: "template/dialect/gremlin/create.tmpl", size: 2567, mode: os.FileMode(420), modTime: time.Unix(1560858191, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -308,7 +319,7 @@ func templateDialectGremlinDeleteTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/gremlin/delete.tmpl", size: 549, mode: os.FileMode(420), modTime: time.Unix(1558503319, 0)} + info := bindataFileInfo{name: "template/dialect/gremlin/delete.tmpl", size: 549, mode: os.FileMode(420), modTime: time.Unix(1560858190, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -328,7 +339,7 @@ func templateDialectGremlinGroupTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/gremlin/group.tmpl", size: 1151, mode: os.FileMode(420), modTime: time.Unix(1558503319, 0)} + info := bindataFileInfo{name: "template/dialect/gremlin/group.tmpl", size: 1151, mode: os.FileMode(420), modTime: time.Unix(1560858192, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -348,7 +359,7 @@ func templateDialectGremlinQueryTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/gremlin/query.tmpl", size: 2505, mode: os.FileMode(420), modTime: time.Unix(1561481160, 0)} + info := bindataFileInfo{name: "template/dialect/gremlin/query.tmpl", size: 2505, mode: os.FileMode(420), modTime: time.Unix(1561538327, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -368,7 +379,7 @@ func templateDialectGremlinUpdateTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/gremlin/update.tmpl", size: 4708, mode: os.FileMode(420), modTime: time.Unix(1558503319, 0)} + info := bindataFileInfo{name: "template/dialect/gremlin/update.tmpl", size: 4708, mode: os.FileMode(420), modTime: time.Unix(1560858191, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -388,7 +399,7 @@ func templateDialectSqlCreateTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/sql/create.tmpl", size: 6061, mode: os.FileMode(420), modTime: time.Unix(1562756996, 0)} + info := bindataFileInfo{name: "template/dialect/sql/create.tmpl", size: 6061, mode: os.FileMode(420), modTime: time.Unix(1562774910, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -408,7 +419,7 @@ func templateDialectSqlDeleteTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/sql/delete.tmpl", size: 493, mode: os.FileMode(420), modTime: time.Unix(1558541632, 0)} + info := bindataFileInfo{name: "template/dialect/sql/delete.tmpl", size: 493, mode: os.FileMode(420), modTime: time.Unix(1560858192, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -428,7 +439,7 @@ func templateDialectSqlGroupTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/sql/group.tmpl", size: 835, mode: os.FileMode(420), modTime: time.Unix(1558503319, 0)} + info := bindataFileInfo{name: "template/dialect/sql/group.tmpl", size: 835, mode: os.FileMode(420), modTime: time.Unix(1560858192, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -448,7 +459,7 @@ func templateDialectSqlQueryTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/sql/query.tmpl", size: 2732, mode: os.FileMode(420), modTime: time.Unix(1561476415, 0)} + info := bindataFileInfo{name: "template/dialect/sql/query.tmpl", size: 2732, mode: os.FileMode(420), modTime: time.Unix(1561538327, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -468,7 +479,7 @@ func templateDialectSqlUpdateTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/sql/update.tmpl", size: 11248, mode: os.FileMode(420), modTime: time.Unix(1561989286, 0)} + info := bindataFileInfo{name: "template/dialect/sql/update.tmpl", size: 11248, mode: os.FileMode(420), modTime: time.Unix(1562007725, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -488,7 +499,7 @@ func templateEntTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/ent.tmpl", size: 6592, mode: os.FileMode(420), modTime: time.Unix(1563488473, 0)} + info := bindataFileInfo{name: "template/ent.tmpl", size: 6592, mode: os.FileMode(420), modTime: time.Unix(1563187953, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -508,7 +519,7 @@ func templateExampleTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/example.tmpl", size: 2411, mode: os.FileMode(420), modTime: time.Unix(1563538691, 0)} + info := bindataFileInfo{name: "template/example.tmpl", size: 2411, mode: os.FileMode(420), modTime: time.Unix(1563781929, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -528,7 +539,7 @@ func templateHeaderTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/header.tmpl", size: 101, mode: os.FileMode(420), modTime: time.Unix(1554626550, 0)} + info := bindataFileInfo{name: "template/header.tmpl", size: 101, mode: os.FileMode(420), modTime: time.Unix(1560858191, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -548,7 +559,7 @@ func templateImportTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/import.tmpl", size: 588, mode: os.FileMode(420), modTime: time.Unix(1563537986, 0)} + info := bindataFileInfo{name: "template/import.tmpl", size: 588, mode: os.FileMode(420), modTime: time.Unix(1563781929, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -568,7 +579,7 @@ func templateMetaTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/meta.tmpl", size: 3550, mode: os.FileMode(420), modTime: time.Unix(1558789265, 0)} + info := bindataFileInfo{name: "template/meta.tmpl", size: 3550, mode: os.FileMode(420), modTime: time.Unix(1560858192, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -588,7 +599,7 @@ func templateMigrateMigrateTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/migrate/migrate.tmpl", size: 715, mode: os.FileMode(420), modTime: time.Unix(1563488473, 0)} + info := bindataFileInfo{name: "template/migrate/migrate.tmpl", size: 715, mode: os.FileMode(420), modTime: time.Unix(1563187953, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -608,12 +619,12 @@ func templateMigrateSchemaTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/migrate/schema.tmpl", size: 2659, mode: os.FileMode(420), modTime: time.Unix(1563488473, 0)} + info := bindataFileInfo{name: "template/migrate/schema.tmpl", size: 2659, mode: os.FileMode(420), modTime: time.Unix(1563187953, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _templateTxTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x57\x4d\x8f\xdb\x36\x10\x3d\x4b\xbf\x62\x6a\x2c\x0a\x7b\xa1\x48\x3d\x1b\xd8\xd3\xa6\x87\x02\xed\xa2\x6d\x1c\x34\xb7\x84\x26\xc7\x16\x11\x89\x74\x29\xca\xa6\x21\xf8\xbf\x17\x33\xd4\x97\xd7\xde\xf4\xe3\xd2\x4b\xd6\x22\x67\x86\x6f\x66\xde\x3c\x32\x5d\x07\x0a\x77\xda\x20\x2c\x7c\x58\xc0\xe5\x92\xa6\x5d\x07\x0f\x87\xaf\x7b\x58\x3f\xc1\x56\x34\x08\x0f\xf9\xb3\x35\x3b\xbd\xcf\x7f\x15\xf2\xab\xd8\x23\x19\x75\x1d\x78\xac\x0f\x95\xf0\x08\x8b\x12\x85\x42\xb7\x88\x5e\x14\x41\xd7\x07\xeb\x3c\x2c\xd3\x64\x21\xad\xf1\x18\xfc\x22\x4d\x16\xcd\xd9\xc8\x45\x9a\x26\x8b\xdd\x56\x16\x68\x7c\xa1\xb4\xa8\x50\xfa\x45\xba\x4a\xd3\xa2\x80\x4d\x00\xdd\x80\x00\xef\x84\x69\x84\xf4\xda\x1a\x51\x81\xac\x34\x1a\x0f\xbe\x14\x9e\xb6\xa5\x43\xe1\x51\xc1\xf6\x0c\x52\x54\x95\x36\x7b\x78\x66\x8b\x7c\x13\x96\xab\x3c\xf5\xe7\x03\x52\xa4\xc6\xbb\x56\x7a\xe8\xd2\x44\x32\xf8\x34\xe9\x3a\x70\xc2\xec\x11\x1e\x3e\x67\xf0\x60\x28\xbd\x87\xfc\xc5\x2a\x6c\xe0\xdd\xe5\x92\x26\x49\x51\x00\xa5\x6e\xf2\x17\x51\x53\x92\x74\x9c\x2f\x71\x40\xb0\xb3\x0e\xb4\xf1\xe8\x08\x9a\xd9\xc3\x49\xfb\x92\xf7\xaf\x9d\xb6\xad\xae\x14\xba\x26\x4f\x93\xe4\x7a\xe7\xf1\xea\x33\xa2\x66\x58\x68\x14\x95\xed\xc2\x55\x78\xb6\x75\xad\x3d\x48\xfe\x13\x01\xcc\x0a\x92\xa7\xbb\xd6\x48\x58\xfa\x00\x8f\x9b\xb0\xea\xad\x97\x2b\x40\xe7\xac\xa3\x74\x1d\xfa\xd6\x19\xf0\x21\x8f\x89\xe7\xca\xe9\x23\xba\x7c\xf9\xe8\xc3\x7b\xfe\xb9\xca\x7d\xc8\x07\xc7\xfe\xd4\xdf\x6d\x55\x6d\x85\xfc\x0a\xae\xff\xf1\xb7\x27\x0f\x1e\xff\xe1\xec\xc9\x75\xc8\x39\x56\x38\xba\x13\x05\x9e\x67\x4d\xdf\x6a\xa3\x1a\xf0\x16\x64\xeb\x1c\xaf\x7e\xa3\x1c\xec\xb7\x5c\xc1\x63\x1f\x61\x02\xf5\x7d\x5c\xe9\xd2\xa4\x67\xc4\x7a\xc2\x99\xa5\x49\xf2\x41\x96\x58\x8b\x35\xd4\x7a\xef\x84\xc7\xfc\x05\x4f\x71\x69\xe9\x43\x9f\xc7\x2a\x8b\x3d\xfd\x36\x8d\xae\xbb\xbe\x86\x17\x3c\xdd\x69\xfc\x72\x3c\x7c\x88\x4a\x2c\xe0\x08\xcc\x84\xae\x2b\x1e\x61\xa7\x5d\xe3\xc1\x58\x85\xcc\x3e\x65\x25\x60\x10\xf5\xa1\x42\x78\x2c\x78\x0a\xdf\xc1\x43\x34\x5a\x3f\x81\x36\x0a\xc3\x08\xe6\x07\x9e\xc4\xa2\x80\xa1\xf4\x70\x72\xe2\x10\xdb\xba\xd7\x47\x34\xd0\x8f\x5f\xbe\x09\x91\xcb\x02\x8c\x3d\x8c\xab\xbd\x93\xa6\xd3\x6a\x34\x5e\xc4\x7a\xd3\x9c\x96\x08\x5a\xa1\xe0\xf9\xb0\xd0\xb4\x07\x9e\xf6\x59\x5b\x1a\x0e\x68\x5b\x0f\x42\x29\x9a\x15\x61\xce\x80\xc1\x3b\x01\x92\x92\xf1\x96\x61\x4c\xa3\x52\x14\xf0\x47\x89\x06\xc4\xb0\xc6\xc3\xcd\xe1\x7b\x0a\xd1\x74\x67\xa0\x3d\xec\xb1\x9f\x8a\x86\xca\x39\xcb\x41\x9b\xc6\x0b\x23\x31\x9f\x4d\x91\x30\x6a\xa2\xb6\x70\xc8\x19\x52\x29\x29\x00\x0f\x33\x49\xcc\x80\x83\xcd\x69\xa7\x6d\xd0\x41\xdd\x36\x9e\x61\x80\x35\x48\x31\xed\x8e\x36\x6b\xd0\x06\xac\x23\x8c\xc4\xc9\x78\x8e\x75\xe3\xe0\xdc\xce\x4d\x51\x90\xf7\x4f\x3b\x10\x20\x2b\xdb\xa0\x9a\x6f\x53\x11\xb1\xde\xa2\x52\xa8\x38\xb2\xc1\xfe\x20\xd8\xa3\x41\xc7\x62\x87\xc6\x6b\xaf\xb1\xc9\x46\x84\xbc\x72\xa6\xb8\xe2\x70\xa8\x34\xd2\xd0\xfc\xd9\xa2\x3b\x67\x9c\x5e\xcf\x92\x35\x6b\x13\x13\x64\x60\x5f\xfe\x1b\x59\x7d\xfa\xf4\x89\xca\x49\x91\xd8\x0b\x4e\xba\xaa\x60\x8b\x80\x01\x65\xeb\x51\x31\x71\x4a\x67\xdb\x7d\xd4\x38\xd5\x53\xa8\xd4\xb2\x1c\x35\xd8\x97\xc4\x80\xdb\x54\x5f\xac\xc7\x38\xbb\x6c\xd1\xfb\xea\x06\x1a\xb1\x8b\x4c\x96\xd6\x0c\xd3\xdc\x36\x62\x8f\x19\x94\xf6\x84\x47\x74\xdc\xe2\x1e\x44\x03\xd6\x54\x67\xae\x08\x83\xe4\x6c\x7d\xac\xaf\xae\xb1\xd7\xfa\x91\xde\x93\xe2\x33\xf6\x09\x33\x42\xe3\x85\x8b\x80\xaf\x5a\x03\x3b\x67\xeb\x3c\x4d\x94\x3b\xbe\xa2\x3d\xc7\x38\x38\xeb\x51\x0e\x1a\x1c\x60\x8b\x95\x3d\xb1\xcf\x1c\x7f\x04\xcb\xd9\x27\x75\x0b\x74\xc9\xe5\xbf\xb4\x1e\x43\xc4\x11\x86\x5b\xa4\x35\x0a\x5d\x75\xa6\x69\xb8\x2a\x59\xe2\xc3\x8c\xc5\xbd\x20\x1a\x3c\x6d\x42\x5f\x67\x6a\xad\xc1\xd3\xab\x6b\xb1\x1f\x8b\xa8\x7f\x6c\xbe\x94\x3e\x40\x7f\xdd\xd2\x8d\x4d\x7f\x33\xb8\xcd\x6d\x05\x93\x1c\x67\x51\xbb\x57\x54\x35\x1f\xf8\x8b\x94\x44\xb9\x63\x1e\x03\xae\xd2\x44\xef\x78\xf9\xbb\x27\x30\xba\x22\xc3\x41\x51\x8d\xae\xd8\x83\x14\x6b\x54\xd9\x21\x72\xe7\x03\x09\x2c\x03\x58\xd3\x3f\x97\x8c\x1c\xfa\xfc\x36\x61\x14\xfb\xd7\x3d\x21\x95\x3a\xa0\x23\x4d\x1f\xf0\x7a\x0b\xe2\x68\xb5\x1a\xa6\xda\xba\x69\xa8\x59\x27\x28\x24\xf7\xe5\xee\x58\xe7\xf0\xa1\xb4\x6d\xa5\x88\xdf\x64\x8e\x2a\x12\x6b\x7b\x7e\xc3\x7e\x76\xa9\x4c\x20\xa8\x1e\xd7\xc5\x5d\xc1\x72\x6a\xdc\x54\x49\x18\x6f\x41\xce\x18\x62\xc6\xef\xa3\xe5\x55\xda\xbd\xf7\x30\xef\xff\x94\xaf\xf7\xd0\xf5\xe1\x97\x2b\x1a\x03\xe2\xd8\x0c\x46\x4e\xed\x9c\x0c\x86\x2b\xd7\x36\x18\xdf\x5b\xa4\x89\x2c\x4c\x43\xe8\x59\x5c\x36\x9b\xae\x78\x98\x5a\x0f\x57\xcf\x95\x29\x50\xfc\x7e\x53\x63\x59\x9d\x3f\x5e\xeb\xeb\x97\xcd\xf0\x1e\xf9\x72\x4f\x5c\xdf\x78\x88\xcc\x51\xbe\x7a\x05\xdd\xc2\x1c\xf9\x32\x02\x1d\xf5\xfa\x5f\x43\x1d\x62\x5d\x83\x7d\x5b\xff\x6f\xe0\xde\x3e\x9d\x6e\x01\xff\x18\x50\x0e\x97\x60\xc8\xe9\xeb\x7e\xe3\x69\xe7\xfe\xe4\x47\x61\x8f\x74\xc8\x40\xb8\x7d\x13\x53\xdc\x09\x89\xdd\x25\x83\xe3\xfc\x73\xf6\x88\xf3\x21\xaf\xdb\xfc\x67\xcb\xef\xb3\x44\xe1\x8e\xf2\xe3\xb5\x8f\xa6\xea\x57\x27\x6e\xf5\xe0\x08\x42\x36\xdc\x40\x74\x56\x06\xc7\xe1\x75\xc7\x37\xce\x94\x0b\x7f\xde\x4f\x86\xb7\xfe\xe7\x6c\x46\x0c\x77\xd3\x39\x0a\x07\x9f\x5f\xbf\x91\x9e\xe6\xdd\x5d\x1a\x5d\xad\xf8\x3f\x51\xfd\xb3\xfe\xaf\x00\x00\x00\xff\xff\x08\xa2\xb4\xee\x62\x0d\x00\x00") +var _templateTxTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x57\x4d\x8f\xe3\x36\x0f\x3e\xdb\xbf\x82\x6f\x30\x78\x11\x07\x5e\xbb\xe7\x00\x73\x9a\xed\xa1\x97\x41\xdb\x4d\xd1\xbd\xed\x2a\x12\x63\x0b\x6b\x4b\xa9\x4c\x27\x0e\x8c\xfc\xf7\x82\x92\xbf\x32\xc9\x6c\x3f\x80\x5e\x76\x62\x89\xa4\x1e\x92\x0f\x1f\x69\xfb\x1e\x14\x1e\xb4\x41\x58\x51\xb7\x82\xeb\x35\x8e\xfb\x1e\x9e\x8e\xdf\x0a\xd8\x3e\xc3\x5e\x34\x08\x4f\xd9\x8b\x35\x07\x5d\x64\x3f\x0b\xf9\x4d\x14\xc8\x46\x7d\x0f\x84\xf5\xb1\x12\x84\xb0\x2a\x51\x28\x74\xab\xe0\xc5\x11\x74\x7d\xb4\x8e\x60\x1d\x47\x2b\x69\x0d\x61\x47\xab\x38\x5a\x35\x17\x23\x57\x71\x1c\xad\x0e\x7b\x99\xa3\xa1\x5c\x69\x51\xa1\xa4\x55\x9c\xc4\x71\x9e\xc3\xae\x03\xdd\x80\x00\x72\xc2\x34\x42\x92\xb6\x46\x54\x20\x2b\x8d\x86\x80\x4a\x41\xbc\x2d\x1d\x0a\x42\x05\xfb\x0b\x48\x51\x55\xda\x14\xf0\xe2\x2d\xb2\x5d\xb7\x4e\xb2\x98\x2e\x47\xe4\x48\x0d\xb9\x56\x12\xf4\x71\x24\x3d\xf8\x38\xea\x7b\x70\xc2\x14\x08\x4f\x5f\x52\x78\x32\x9c\xde\x53\xf6\x6a\x15\x36\xf0\xe1\x7a\x8d\xa3\x28\xcf\x81\x53\x37\xd9\xab\xa8\x39\x49\x3e\x8e\x4a\x1c\x11\x1c\xac\x03\x6d\x08\x1d\x43\x33\x05\x9c\x35\x95\x7e\xff\xd6\x69\xdf\xea\x4a\xa1\x6b\xb2\x38\x8a\x6e\x77\x36\x37\x9f\x01\xb5\x87\x85\x46\x71\xd9\xae\xbe\x0a\x2f\xb6\xae\x35\x81\xf4\x7f\x02\x80\x45\x41\xb2\xf8\xd0\x1a\x09\x6b\xea\x60\xb3\xeb\x92\xc1\x7a\x9d\x00\x3a\x67\x1d\xa7\xeb\x90\x5a\x67\x80\xba\x2c\x24\x9e\x29\xa7\x4f\xe8\xb2\xf5\x86\xba\x8f\xfe\x67\x92\x51\x97\x8d\x8e\xc3\xa9\xbf\xda\xaa\xda\x0b\xf9\x0d\xdc\xf0\xe3\x2f\x4f\x1e\x3d\xfe\xc5\xd9\xb3\xeb\x98\x73\xa8\x70\x70\x67\x0a\xbc\x2c\x9a\xbe\xd7\x46\x35\x40\x16\x64\xeb\x9c\x5f\xfd\x4e\x39\xbc\xdf\x3a\x81\xcd\x10\x61\x06\xf5\xff\xb0\xd2\xc7\xd1\xc0\x88\xed\x8c\x33\x8d\xa3\xe8\x93\x2c\xb1\x16\x5b\xa8\x75\xe1\x04\x61\xf6\x8a\xe7\xb0\xb4\xa6\x6e\xc8\x23\x49\x43\x4f\xbf\x4f\xa3\xdb\xae\x6f\xe1\x15\xcf\x0f\x1a\xbf\x9e\x0e\x1f\xa3\x32\x0b\x7c\x04\xcf\x84\xbe\xcf\x37\x70\xd0\xae\x21\x30\x56\xa1\x67\x9f\xb2\x12\xb0\x13\xf5\xb1\x42\xd8\xe4\x7e\x0a\x3f\xc0\x53\x30\xda\x3e\x83\x36\x0a\xbb\x09\xcc\x0f\x7e\x12\xf3\x1c\xc6\xd2\xc3\xd9\x89\x63\x68\x6b\xa1\x4f\x68\x60\x18\xbf\x6c\xd7\x05\x2e\x0b\x30\xf6\x38\xad\x0e\x4e\x9a\x4f\xab\xd1\x90\x08\xf5\xe6\x39\x2d\x11\xb4\x42\xe1\xe7\xc3\x42\xd3\x1e\xfd\xb4\x2f\xda\xd2\xf8\x80\xb6\x25\x10\x4a\xf1\xac\x08\x73\x01\xec\xc8\x09\x90\x9c\x0c\x59\x0f\x63\x1e\x95\x3c\x87\xdf\x4b\x34\x20\xc6\x35\x3f\xdc\x3e\xfc\x40\x21\x9e\xee\x14\x34\x41\x81\xc3\x54\x34\x5c\xce\x45\x0e\xda\x34\x24\x8c\xc4\x6c\x31\x45\xc2\xa8\x99\xda\xc2\xa1\xcf\x90\x4b\xc9\x01\xfc\x30\xb3\xc4\x8c\x38\xbc\x39\xef\xb4\x0d\x3a\xa8\xdb\x86\x3c\x0c\xb0\x06\x39\xa6\x3d\xf0\x66\x0d\xda\x80\x75\x8c\x91\x39\x19\xce\xb1\x6e\x1a\x9c\xfb\xb9\xc9\x73\xf6\xfe\xe9\x00\x02\x64\x65\x1b\x54\xcb\x6d\x2e\x22\xd6\x7b\x54\x0a\x95\x8f\x6c\x70\x38\x08\x0a\x34\xe8\xbc\xd8\xa1\x21\x4d\x1a\x9b\x74\x42\xe8\x57\x2e\x1c\x57\x1c\x8f\x95\x46\x1e\x9a\x3f\x5a\x74\x97\xd4\xa7\x37\xb0\x64\xeb\xb5\xc9\x13\x64\x64\x5f\xf6\x0b\x5b\x7d\xfe\xfc\x99\xcb\xc9\x91\xbc\x17\x9c\x75\x55\xc1\x1e\x01\x3b\x94\x2d\xa1\xf2\xc4\x29\x9d\x6d\x8b\xa0\x71\x6a\xa0\x50\xa9\x65\x39\x69\x30\x95\xcc\x80\xfb\x54\x5f\x2d\x61\x98\xdd\x89\x7b\xba\x01\x63\x09\x0a\xeb\x6c\x4b\x7c\xdb\x34\xe2\x80\x83\x5a\x4f\x46\xb3\x66\xfb\xd3\xe7\x53\x11\x1a\x12\x2e\x1c\x79\x53\x5c\x38\x38\x5b\x67\x71\xa4\xdc\xe9\x0d\x71\x43\x8c\x6e\xd4\xf0\xd6\x28\x74\xd5\x85\xb9\x78\x03\x38\xa2\x6e\xc1\xa1\x41\x8e\x0c\x9e\x77\xdd\x90\x25\x17\xd6\xe0\xf9\xcd\xa5\x34\x90\x32\xa8\x8f\x37\x5f\x4b\xea\x60\xb8\xec\xf8\xbe\xe4\xbf\x29\xdc\xe3\x4a\x60\x16\xc3\x34\x28\x67\xc2\x19\x53\xe7\xbf\x78\x8e\x95\x3b\x65\x21\x60\x12\x47\xfa\xe0\x97\xff\xf7\x0c\x46\x57\x6c\x38\xea\x99\xd1\x95\xf7\x60\xbd\x98\x34\x6e\x8c\xdc\x53\xc7\xf2\xe6\x01\x6c\xf9\x9f\x6b\xca\x0e\x43\x7e\xbb\x6e\x92\xda\xb7\xf5\x64\x8d\x38\xa2\x63\x45\x1d\xf1\x92\x05\x71\xb2\x5a\x8d\x33\x65\xdd\x3c\x52\x7e\x4a\x39\x24\xf7\xe1\xf1\x50\x65\xf0\xa9\xb4\x6d\xa5\x98\x5d\x6c\x8e\x0a\xac\xa9\x2e\x7c\x81\x3f\xb6\x5f\x48\xfa\x0c\x82\xeb\x71\x5b\xdc\x04\xd6\x73\xe3\xe6\x4a\xc2\x74\x07\xf9\x8c\x21\x64\xfc\x31\x58\xde\xa4\x3d\x78\x8f\xd3\xf6\x77\xb9\xf6\x08\xdd\x10\x7e\x9d\x30\x85\x99\x63\x0b\x18\x19\xb7\x73\x36\x18\x2f\x3c\xdb\x60\x78\xed\xb0\x22\x79\x59\x18\x43\x2f\xe2\x7a\xb3\xf9\x82\x85\xb9\xf5\x70\xf3\x58\x98\x03\x85\xef\x77\x15\xce\x6b\xe3\x6f\xb7\xea\xf6\x75\x37\xbe\x06\xbe\x3e\x92\xb6\x77\x9e\x01\x4b\x94\x6f\xde\x20\xf7\x30\x27\xbe\x4c\x40\x27\xb5\xfc\xc7\x50\xc7\x58\xb7\x60\xdf\x57\xdf\x3b\xb8\xf7\x0f\x97\x7b\xc0\x3f\x76\x28\xc7\x2b\xa8\xcb\xf8\xeb\x71\xe3\x79\xe7\xf1\xe4\x07\x59\x0d\x74\x48\x41\xb8\xa2\x09\x29\x1e\x84\xc4\xfe\x9a\xc2\x69\xf9\xf9\xf0\x09\x35\x1c\xcc\xe1\xd3\x51\xdb\x39\x4e\x0a\xa7\xf1\xdd\xe4\xb5\x7c\xc6\xe9\x3f\x1f\x03\xf5\x5b\xff\x21\xd2\x29\xfe\x43\xa8\x27\xe1\xe0\xcb\xdb\x97\xc5\xf3\xb2\x2b\x6b\xa3\xab\xc4\xff\xd7\x63\x78\x0c\xff\x19\x00\x00\xff\xff\x60\x7b\x88\x53\x98\x0c\x00\x00") func templateTxTmplBytes() ([]byte, error) { return bindataRead( @@ -628,7 +639,7 @@ func templateTxTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/tx.tmpl", size: 3426, mode: os.FileMode(420), modTime: time.Unix(1560345874, 0)} + info := bindataFileInfo{name: "template/tx.tmpl", size: 3224, mode: os.FileMode(420), modTime: time.Unix(1563919553, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -648,7 +659,7 @@ func templateWhereTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/where.tmpl", size: 6958, mode: os.FileMode(420), modTime: time.Unix(1559829316, 0)} + info := bindataFileInfo{name: "template/where.tmpl", size: 6958, mode: os.FileMode(420), modTime: time.Unix(1560858192, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/tx.tmpl b/entc/gen/template/tx.tmpl index f7a500328..593ab45af 100644 --- a/entc/gen/template/tx.tmpl +++ b/entc/gen/template/tx.tmpl @@ -53,13 +53,10 @@ func (tx *Tx) Client() *Client { // applies a query, for example: {{ $first.Name }}.QueryXXX(), the query will be executed // through the driver which created this transaction. // -// Note that this driver is safe for concurrent usage, however, it executes only one query -// at the time. +// Note that txDriver is not goroutine safe. type txDriver struct { // the driver we started the transaction from. drv dialect.Driver - // protects the tx below from concurrent execution. - mu sync.Mutex // tx is the underlying transaction. tx dialect.Tx } @@ -93,15 +90,11 @@ func (*txDriver) Rollback() error { return nil } // Exec calls tx.Exec. func (tx *txDriver) Exec(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Exec(ctx, query, args, v) } // Query calls tx.Query. func (tx *txDriver) Query(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Query(ctx, query, args, v) } diff --git a/entc/integration/compose/docker-compose.yaml b/entc/integration/compose/docker-compose.yaml index 6e9dee8c0..8a36f8fd7 100644 --- a/entc/integration/compose/docker-compose.yaml +++ b/entc/integration/compose/docker-compose.yaml @@ -3,7 +3,7 @@ version: "3.7" services: mysql: - image: mysql:5.7.23 + image: mysql:5.7.26 environment: MYSQL_DATABASE: test MYSQL_ROOT_PASSWORD: pass diff --git a/entc/integration/ent/tx.go b/entc/integration/ent/tx.go index 88a7b92d7..202e971cb 100644 --- a/entc/integration/ent/tx.go +++ b/entc/integration/ent/tx.go @@ -4,7 +4,6 @@ package ent import ( "context" - "sync" "fbc/ent/dialect" "fbc/ent/entc/integration/ent/migrate" @@ -70,13 +69,10 @@ func (tx *Tx) Client() *Client { // applies a query, for example: Card.QueryXXX(), the query will be executed // through the driver which created this transaction. // -// Note that this driver is safe for concurrent usage, however, it executes only one query -// at the time. +// Note that txDriver is not goroutine safe. type txDriver struct { // the driver we started the transaction from. drv dialect.Driver - // protects the tx below from concurrent execution. - mu sync.Mutex // tx is the underlying transaction. tx dialect.Tx } @@ -110,15 +106,11 @@ func (*txDriver) Rollback() error { return nil } // Exec calls tx.Exec. func (tx *txDriver) Exec(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Exec(ctx, query, args, v) } // Query calls tx.Query. func (tx *txDriver) Query(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Query(ctx, query, args, v) } diff --git a/entc/integration/migrate/entv1/tx.go b/entc/integration/migrate/entv1/tx.go index e736452fb..7a76e6a2b 100644 --- a/entc/integration/migrate/entv1/tx.go +++ b/entc/integration/migrate/entv1/tx.go @@ -4,7 +4,6 @@ package entv1 import ( "context" - "sync" "fbc/ent/dialect" "fbc/ent/entc/integration/migrate/entv1/migrate" @@ -46,13 +45,10 @@ func (tx *Tx) Client() *Client { // applies a query, for example: User.QueryXXX(), the query will be executed // through the driver which created this transaction. // -// Note that this driver is safe for concurrent usage, however, it executes only one query -// at the time. +// Note that txDriver is not goroutine safe. type txDriver struct { // the driver we started the transaction from. drv dialect.Driver - // protects the tx below from concurrent execution. - mu sync.Mutex // tx is the underlying transaction. tx dialect.Tx } @@ -86,15 +82,11 @@ func (*txDriver) Rollback() error { return nil } // Exec calls tx.Exec. func (tx *txDriver) Exec(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Exec(ctx, query, args, v) } // Query calls tx.Query. func (tx *txDriver) Query(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Query(ctx, query, args, v) } diff --git a/entc/integration/migrate/entv2/tx.go b/entc/integration/migrate/entv2/tx.go index 11ddc138d..e4f74a916 100644 --- a/entc/integration/migrate/entv2/tx.go +++ b/entc/integration/migrate/entv2/tx.go @@ -4,7 +4,6 @@ package entv2 import ( "context" - "sync" "fbc/ent/dialect" "fbc/ent/entc/integration/migrate/entv2/migrate" @@ -52,13 +51,10 @@ func (tx *Tx) Client() *Client { // applies a query, for example: Group.QueryXXX(), the query will be executed // through the driver which created this transaction. // -// Note that this driver is safe for concurrent usage, however, it executes only one query -// at the time. +// Note that txDriver is not goroutine safe. type txDriver struct { // the driver we started the transaction from. drv dialect.Driver - // protects the tx below from concurrent execution. - mu sync.Mutex // tx is the underlying transaction. tx dialect.Tx } @@ -92,15 +88,11 @@ func (*txDriver) Rollback() error { return nil } // Exec calls tx.Exec. func (tx *txDriver) Exec(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Exec(ctx, query, args, v) } // Query calls tx.Query. func (tx *txDriver) Query(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Query(ctx, query, args, v) } diff --git a/entc/integration/plugin/ent/tx.go b/entc/integration/plugin/ent/tx.go index 6e5b2e8a4..b9972b8a4 100644 --- a/entc/integration/plugin/ent/tx.go +++ b/entc/integration/plugin/ent/tx.go @@ -4,7 +4,6 @@ package ent import ( "context" - "sync" "fbc/ent/dialect" "fbc/ent/entc/integration/plugin/ent/migrate" @@ -46,13 +45,10 @@ func (tx *Tx) Client() *Client { // applies a query, for example: Boring.QueryXXX(), the query will be executed // through the driver which created this transaction. // -// Note that this driver is safe for concurrent usage, however, it executes only one query -// at the time. +// Note that txDriver is not goroutine safe. type txDriver struct { // the driver we started the transaction from. drv dialect.Driver - // protects the tx below from concurrent execution. - mu sync.Mutex // tx is the underlying transaction. tx dialect.Tx } @@ -86,15 +82,11 @@ func (*txDriver) Rollback() error { return nil } // Exec calls tx.Exec. func (tx *txDriver) Exec(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Exec(ctx, query, args, v) } // Query calls tx.Query. func (tx *txDriver) Query(ctx context.Context, query string, args interface{}, v interface{}) error { - tx.mu.Lock() - defer tx.mu.Unlock() return tx.tx.Query(ctx, query, args, v) } diff --git a/entc/internal/build/bindata.go b/entc/internal/build/bindata.go index 4f9fc56e8..dfbc7c94f 100644 --- a/entc/internal/build/bindata.go +++ b/entc/internal/build/bindata.go @@ -1,4 +1,4 @@ -// Code generated by go-bindata. (@generated) DO NOT EDIT. +// Package build Code generated by go-bindata. (@generated) DO NOT EDIT. // sources: // template/build.tmpl package build @@ -47,21 +47,32 @@ type bindataFileInfo struct { modTime time.Time } +// Name return file name func (fi bindataFileInfo) Name() string { return fi.name } + +// Size return file size func (fi bindataFileInfo) Size() int64 { return fi.size } + +// Mode return file mode func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } + +// Mode return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } + +// IsDir return file whether a directory func (fi bindataFileInfo) IsDir() bool { - return false + return fi.mode&os.ModeDir != 0 } + +// Sys return file is sys mode func (fi bindataFileInfo) Sys() interface{} { return nil } @@ -81,7 +92,7 @@ func templateBuildTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/build.tmpl", size: 364, mode: os.FileMode(420), modTime: time.Unix(1562857148, 0)} + info := bindataFileInfo{name: "template/build.tmpl", size: 364, mode: os.FileMode(420), modTime: time.Unix(1560858190, 0)} a := &asset{bytes: bytes, info: info} return a, nil }