diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index a4b4112f3..2e6730f36 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -491,7 +491,7 @@ func templateDialectGremlinGroupTmpl() (*asset, error) { return a, nil } -var _templateDialectGremlinMetaTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x90\x41\x6b\x1b\x31\x14\x84\xcf\xd1\xaf\x18\x8c\x4f\xa1\xde\x4d\x73\x6b\x21\x87\x60\x5c\x30\x84\x5c\xda\x7b\x91\xa5\xd9\x5d\x51\x59\x32\x7a\x72\x8a\x11\xfa\xef\x45\x9b\x4d\x9c\x43\xa1\x97\xde\xf4\xde\xf7\x66\x66\x77\x4a\xe9\x6f\xd5\x36\x9e\x2e\xc9\x8d\x53\xc6\xfd\xdd\xe7\x2f\x9b\x53\xa2\x30\x64\x7c\xd3\x86\x87\x18\x7f\x61\x1f\x4c\x87\x47\xef\x31\x1f\x09\x1a\x4f\x2f\xb4\x9d\xfa\x31\x39\x81\xc4\x73\x32\x84\x89\x96\x70\x02\xef\x0c\x83\xd0\xe2\x1c\x2c\x13\xf2\x44\x3c\x9e\xb4\x99\x88\xfb\xee\xee\x8d\x62\x88\xe7\x60\x95\x0b\x33\x7f\xda\x6f\x77\xcf\xdf\x77\x18\x9c\x27\x96\x5d\x8a\x31\xc3\xba\x44\x93\x63\xba\x20\x0e\xc8\x1f\xc2\x72\x22\x3b\x75\xdb\xd7\xaa\x54\xfb\x07\x98\x18\x24\xeb\x90\x05\x81\xb4\xb4\x18\x62\xc2\x98\x78\xf4\x2e\xc0\x3a\xed\x69\xb2\x74\x98\x15\xa5\xc0\x72\x70\x81\x58\x2d\xa4\x5f\x2e\xfb\x23\xb3\xee\xdf\xbd\x56\xa8\x55\xdd\x94\x82\xa4\xc3\x48\xac\x7f\x7e\xc2\x9a\xf8\xfa\x80\x75\xb7\xb3\x23\x05\xb5\x96\x82\xb5\xd7\x07\xfa\x79\xcd\xee\xa9\xbd\xb7\x8b\x01\x36\x4d\xdf\x0c\xdc\xd0\xe0\x5e\xf6\xe1\x85\x49\x38\x0b\x37\x6f\xca\x59\xb8\x90\xbf\xe9\x6f\xfa\x1e\xd7\x9c\x5a\x31\x45\x6f\x65\x6e\x49\x72\x72\x61\xc4\x2b\xb1\x0c\x31\xb7\xb1\x91\x52\xe0\xe3\x6f\xa6\xe6\xfd\xac\x8f\x2d\x12\x6e\x49\xa7\x1d\x89\x7c\x39\xbd\x97\x6d\x75\xd6\x07\x2d\xec\x5e\xbf\x96\x5e\xf8\xbf\xb3\xff\x99\x19\xec\xb5\xae\x6b\xdc\x03\x56\x6d\x5e\x8a\x45\xad\x2b\xf5\xf1\x7a\x79\xd6\xaa\xfe\x04\x00\x00\xff\xff\xb1\x73\xa1\x6f\xca\x02\x00\x00") +var _templateDialectGremlinMetaTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x90\xc1\x6a\x1b\x31\x14\x45\xd7\xd1\x57\x5c\x8c\x57\x01\xcf\xa4\xd9\xb5\x90\x45\x30\x2e\x18\x42\x36\xed\x0f\xc8\xd2\x9d\x19\x51\x59\x32\x7a\x72\x8a\x11\xfa\xf7\xa2\xc9\x24\xf6\xa2\xd0\x4d\x77\x92\xce\x3b\xef\xce\xdc\x52\xfa\x7b\xb5\x8d\xa7\x4b\x72\xe3\x94\xf1\xf8\xf0\xe5\xeb\xe6\x94\x28\x0c\x19\xdf\xb5\xe1\x21\xc6\x5f\xd8\x07\xd3\xe1\xd9\x7b\xcc\x43\x82\xc6\xd3\x1b\x6d\xa7\x7e\x4e\x4e\x20\xf1\x9c\x0c\x61\xa2\x25\x9c\xc0\x3b\xc3\x20\xb4\x38\x07\xcb\x84\x3c\x11\xcf\x27\x6d\x26\xe2\xb1\x7b\xf8\xa0\x18\xe2\x39\x58\xe5\xc2\xcc\x5f\xf6\xdb\xdd\xeb\x8f\x1d\x06\xe7\x89\xe5\x2d\xc5\x98\x61\x5d\xa2\xc9\x31\x5d\x10\x07\xe4\x9b\xb0\x9c\xc8\x4e\xdd\xf7\xb5\x2a\xd5\xfe\x01\x26\x06\xc9\x3a\x64\x41\x20\x2d\x2d\x86\x98\x30\x26\x1e\xbd\x0b\xb0\x4e\x7b\x9a\x2c\x1d\x66\xa3\x14\x58\x0e\x2e\x10\xab\x85\xf4\xcb\x64\x7f\x64\xd6\xfd\xe7\xae\x15\x6a\x55\x77\xa5\x20\xe9\x30\x12\x6b\xe2\xdb\x13\xd6\xdd\xce\x8e\x14\xd4\x5a\x0a\xd6\x5e\x1f\xe8\xe7\x67\x76\x2f\xed\xbc\x5d\x64\x6c\x9a\xdb\x64\x37\x34\xb8\x97\x7d\x78\x63\x12\xce\xe2\xe6\xc3\x9c\xc5\x85\xfc\xcd\xbf\xeb\x7b\x5c\x73\x6a\xc5\x14\xbd\x95\xb9\x21\xc9\xc9\x85\x11\xef\xc4\x32\xc4\xdc\xae\x8d\x94\x02\x1f\x7f\x33\xb5\xdd\xaf\xfa\xd8\x22\xe1\x96\x74\xda\x91\xc8\x97\xd3\x67\xd1\x56\x67\x7d\xd0\xc2\xee\xfd\x6b\xe9\x85\xff\x3b\xfb\x9f\x99\xc1\x5e\xeb\xba\xc6\x3d\x61\xd5\xee\x4b\xb1\xa8\x75\xa5\x6e\xa7\x97\x63\xad\xea\x4f\x00\x00\x00\xff\xff\x71\xf6\x7c\x35\xc6\x02\x00\x00") func templateDialectGremlinMetaTmplBytes() ([]byte, error) { return bindataRead( @@ -506,7 +506,7 @@ func templateDialectGremlinMetaTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/gremlin/meta.tmpl", size: 714, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/dialect/gremlin/meta.tmpl", size: 710, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1211,7 +1211,7 @@ func templateTxTmpl() (*asset, error) { return a, nil } -var _templateWhereTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x58\xcf\x6f\xe3\xb6\x12\x3e\x5b\x7f\xc5\x40\x50\xf0\xec\xe0\x2d\xb5\x6f\x6f\xaf\x40\x0e\xee\x26\xdb\x75\x51\x24\xdb\x26\x68\x0f\x41\x0e\x8c\x38\xb2\x88\xc8\xa4\x96\xa4\x9d\x0d\x04\xff\xef\xc5\x90\xfa\x65\xc7\xb1\x9d\x6e\x50\xec\xcd\x26\x87\xc3\x99\x6f\xbe\x6f\x48\xb1\xae\xd3\xd3\xe8\xa3\xae\x9e\x8c\x9c\x17\x0e\x3e\xbc\xff\xdf\xff\xdf\x55\x06\x2d\x2a\x07\x9f\x78\x86\xf7\x5a\x3f\xc0\x4c\x65\x0c\xa6\x65\x09\xde\xc8\x02\xcd\x9b\x15\x0a\x16\xdd\x14\xd2\x82\xd5\x4b\x93\x21\x64\x5a\x20\x48\x0b\xa5\xcc\x50\x59\x14\xb0\x54\x02\x0d\xb8\x02\x61\x5a\xf1\xac\x40\xf8\xc0\xde\xb7\xb3\x90\xeb\xa5\x12\x91\x54\x7e\xfe\xb7\xd9\xc7\x8b\xcb\xeb\x0b\xc8\x65\x89\xd0\x8c\x19\xad\x1d\x08\x69\x30\x73\xda\x3c\x81\xce\xc1\x0d\x36\x73\x06\x91\x45\xa7\xe9\x7a\x1d\x45\x75\x0d\x02\x73\xa9\x10\xe2\xc7\x02\x0d\xc6\x10\x46\xdf\xc1\xa3\x74\x05\xe0\x37\x87\x4a\x40\x02\xf1\x17\x9e\x3d\xf0\x39\xc6\x90\xb0\xe6\x27\xbc\x5b\xaf\xa3\x51\x5d\x83\xc3\x45\x55\x72\x87\x10\x17\xc8\x05\x9a\x18\x18\x79\xa9\x6b\xa0\xb5\xcd\x2e\xbd\x91\x5c\x54\xda\xb8\x18\x12\x3f\x95\xa6\x30\x3b\xa7\xe0\x1d\x1a\x0b\x2b\x34\x4e\x66\x68\xe1\x9e\x13\x0a\xda\xa7\x23\x4d\x30\xc1\x52\xb0\x28\x5f\xaa\x0c\x66\xe7\x63\x29\xa0\xae\x21\x61\xb3\x73\x76\xf3\x54\x21\xac\xd7\x13\xa8\x0c\x0a\x99\x71\x87\xcc\x4f\x5d\xf2\x05\x8d\x43\x1d\x8d\x0c\xba\xa5\x51\x2f\x18\x8c\xa3\xd1\x88\x32\x4e\xdc\xa2\x2a\xe1\xa7\x33\xa8\x8c\x54\x2e\x87\x58\x48\x5e\x62\xe6\xd2\x13\x9b\x76\x2b\x53\x29\x08\x83\x6b\xa7\x0d\x61\x40\x10\xf8\xc5\xdf\xba\x04\x83\x9b\x24\xc0\x33\x89\x42\xfa\x86\xab\x39\x42\xa2\x2b\xf2\xaf\x2b\xeb\x23\x87\x06\xc0\x84\x9b\x39\x8d\xc7\xe4\x7b\xbd\xae\x6b\x90\x39\xd9\xb2\x3f\xb9\x91\x5c\xc8\x2c\x0c\x7a\x33\x6f\x65\x1b\xb3\x06\x5f\xef\xc3\x03\x33\x08\x7e\x76\x7e\x62\x63\xef\xa5\x49\x33\x1a\xa5\x29\x74\x96\xeb\x35\xf0\xaa\x2a\x25\x5a\xcf\x18\x1a\xef\x4d\x7b\xa0\x9a\x12\x0c\x0a\x30\xf2\xcb\x07\x7e\xc6\x6d\x68\x04\xf5\xae\xd0\x19\x63\x5d\xac\xaf\xa8\xd9\xe1\xa2\x8d\x76\xf0\x74\x6a\xe6\x71\x08\x27\xbe\xaa\x7c\xfe\x10\x37\xc5\x1a\xd6\xcd\x17\xc7\x7b\x38\xba\xec\xa9\xae\xec\xb3\xd2\xef\x2e\x3e\x6b\x26\x69\x8e\xe2\x0a\xbb\x4d\xa2\xd1\xb6\x2a\x1a\x5a\xe4\xb4\x7d\xc2\x3e\x11\xc2\xb6\xa9\x68\x7a\x0a\xbf\x5e\x5f\x5d\x42\xc6\x95\xd2\x0e\xee\xa9\x49\x2c\x2a\x6e\xa8\x39\x58\xa9\xe6\x10\x9f\xc5\xc0\x95\x80\x0b\xb5\x5c\x40\xc1\x2d\x70\x70\x84\x6a\xd0\xb3\x08\xc0\x50\xed\x7c\xe1\x40\x11\x6e\x5e\xf4\x3e\xe9\x82\xdb\x2f\xb4\x2b\xf9\x1e\x6b\x03\x49\xce\x66\xd6\x6f\xe8\x7f\x91\xd3\x49\xc7\xad\xb0\x33\xbf\x2f\xd1\x07\x9a\xb3\x8f\x5a\x91\x54\x51\xdc\xe8\x9f\xb9\xf5\x55\x8e\x7c\xb6\x32\xf7\x31\x05\xf7\xc3\x75\x8d\x50\x7a\xae\xaf\xe2\x7e\xac\xe5\x6e\x92\xb3\x6b\x67\x96\x99\xf3\x48\x84\xf9\x17\x48\x8b\x5f\x97\xbc\x94\xee\x09\xb2\x02\xb3\x87\xe7\x84\xad\x6b\xf8\xba\xd4\x54\x91\xbc\x23\x55\x60\x30\xcc\xdc\x7f\x2c\x48\x81\xca\xc9\x8c\x97\xe0\xf4\x70\x83\x8b\xdf\x59\x34\x3a\xc4\xf1\x24\x3f\x8a\xc0\x2d\x22\x49\xce\x3e\x73\xfb\x8b\x6e\xd6\x78\xda\xac\x7c\xc2\xc1\x97\x87\xd0\x4f\x76\xa8\x34\x1d\xa9\x51\xfc\x2a\x8b\xb7\x18\x15\xfe\x1d\x56\xc8\x01\x89\x78\x9c\x63\x22\x60\x2b\x88\xe3\x15\x91\x37\x6b\xb7\x05\xb1\x57\x11\x5b\x92\x20\x4d\x8c\x1a\xea\x34\x69\x1d\x2d\x10\xd2\xb6\xed\xda\x69\xde\x8e\xfa\x64\xbb\xa0\xd8\x55\x65\x7b\x9e\x91\xe5\x19\x51\x08\x95\xb0\xe1\xef\x38\xe3\x65\xb9\x65\x9f\xe4\x1d\xf5\x07\x1d\x76\xa3\x85\xfb\xb5\xdb\xed\x7b\x75\x4c\xf7\x5e\x1d\x6c\xde\xdb\x32\xd8\xe8\xe1\xbe\x3c\x44\x95\x20\x17\x62\x0d\x19\x53\x43\xe8\xf6\x6e\x05\xdc\x6c\xec\xcd\xcf\xc0\x19\xb9\x68\x8f\xee\x30\xd6\x1f\xe5\x1b\x01\x7d\xc7\x31\xf1\xb2\xea\x76\x9f\x1b\x32\xf7\x0d\xc8\xfb\x94\xe5\x16\x58\xc7\x9e\x27\x2e\xc8\xaa\x1b\xdb\xab\xc9\x56\x92\x9b\x2e\x89\x8a\x2b\x82\x74\xc1\x1f\x70\x7c\x7b\x27\x95\x43\x93\xf3\x0c\xeb\xf5\x7f\xa1\x44\x35\xd0\xff\x84\x28\x3b\xca\xb5\x01\x49\x0b\x02\x2b\x56\x41\xef\xbd\xda\x36\x54\x3d\x6e\x75\x74\x62\x6f\xe5\x5d\xd0\xde\xa4\x93\xcb\xea\x56\xde\x81\x6f\x05\x9b\x22\x29\x2d\xee\xb0\x69\xa2\xb8\x95\x77\x1b\x72\x0a\x86\x5d\x8b\xe8\xc8\x16\xf7\x37\x14\xef\xb0\xe9\xcf\xe3\x2d\xd4\x27\xbb\x7a\xd4\xa1\x16\xb5\xb3\x43\x6d\x04\xf4\xbd\x27\x78\xdf\x9e\xde\xf6\x30\xf7\x94\x7c\x9b\xf3\x7c\xd0\x24\x76\x76\xae\x20\x54\x76\x21\xe6\x68\x5f\x90\x7b\xfc\x99\x53\x20\xf8\xec\xec\xdb\x23\xc4\xcf\xdc\x92\xcb\x7d\x0a\xc4\x8e\xf7\x28\xe6\xb8\x4b\x80\x6f\x7f\xfb\xa2\x98\x28\x95\xd7\x97\x84\x62\x4c\x0b\xfe\x46\x15\x09\x29\xf6\x5b\x9e\xd8\xbf\xa4\x2b\xe2\x2e\xf5\xb7\xc5\x36\xa0\xc0\x61\x2e\x57\xa8\x20\xd3\x4a\x48\x27\xb5\xb2\x30\xd6\xae\x40\xd3\x3b\xb2\x93\x5d\x65\xa0\x69\x0b\x8c\xb1\x4d\xac\x31\x34\xf7\x66\xa3\x1f\xb1\x56\x8f\x01\xd3\xb7\xbb\x11\xa7\x29\x4c\x95\x80\xb9\xd1\xcb\xca\x0e\x60\xeb\xef\xb2\xd3\xcb\x73\xd0\x15\x1a\xee\xb4\x81\x7b\x74\x8f\x88\xbe\x36\x8b\xe6\xcb\x70\xaa\xc4\x78\xb0\xee\x19\xa8\xc7\xc0\xf9\x8a\x8f\xc5\x03\x40\x71\x75\xdc\xc7\x22\x1b\x7c\x2c\xa6\x29\x5c\x99\x7d\x10\x5c\xfd\xb1\x17\x81\x2b\xf3\x03\x01\xa0\xcd\x3f\xc9\xff\x52\xbb\x0d\x41\xd2\x61\xd5\xa5\xdc\x68\x31\x68\xad\x0f\x31\x24\x7f\xa9\xdd\xb8\x7a\x21\xf0\x7f\x27\x63\xa5\xdd\xab\x53\xde\x78\x1e\xf1\xcf\x30\x29\x17\xa1\x87\xf0\xb2\x7d\x28\xe9\xae\xb6\xb4\xdc\x86\xbb\x8a\xcb\x8a\x9b\x17\x17\xa6\xa7\xf1\xd6\xd5\xb5\x15\x77\xe3\xa2\xbd\x16\x3f\x7f\xba\x58\xef\x39\xd7\xfa\x9f\xe9\x29\x4c\xfb\xc0\x5d\xc1\x1d\x7d\xac\xd2\x97\xaa\x5e\xa1\x31\x52\x08\x54\x20\x15\x68\xe3\xdf\xb2\x34\x70\x21\xa0\x8f\x2f\x3c\x7a\xd1\x45\x8a\xea\xe9\x2f\x71\x55\xb8\x8e\xb2\xf0\x9d\xba\xfd\x36\xb5\x01\xca\xf0\xc6\xfa\x77\x00\x00\x00\xff\xff\x33\xec\xe2\x11\x89\x13\x00\x00") +var _templateWhereTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x58\x4b\x6f\xe3\x36\x10\x3e\x5b\xbf\x62\x20\x38\xa8\x1d\x34\xd2\x76\x6f\x5d\x20\x87\x74\x93\x6d\x5c\x2c\x92\x6d\x13\xb4\x87\x20\x07\x46\x1c\x59\x44\x64\x52\x4b\xd2\xce\x06\x82\xff\x7b\x31\x24\xf5\xf0\x23\xb6\xd3\x0d\x8a\xbd\xd9\xe4\x70\x1e\xdf\xcc\x37\x1c\xb1\xae\xd3\xe3\xe8\xa3\xaa\x9e\xb5\x98\x16\x16\xde\xbf\xfb\xe5\xd7\x93\x4a\xa3\x41\x69\xe1\x13\xcb\xf0\x41\xa9\x47\x98\xc8\x2c\x81\xb3\xb2\x04\x27\x64\x80\xf6\xf5\x02\x79\x12\xdd\x16\xc2\x80\x51\x73\x9d\x21\x64\x8a\x23\x08\x03\xa5\xc8\x50\x1a\xe4\x30\x97\x1c\x35\xd8\x02\xe1\xac\x62\x59\x81\xf0\x3e\x79\xd7\xec\x42\xae\xe6\x92\x47\x42\xba\xfd\xcf\x93\x8f\x17\x57\x37\x17\x90\x8b\x12\x21\xac\x69\xa5\x2c\x70\xa1\x31\xb3\x4a\x3f\x83\xca\xc1\xf6\x8c\x59\x8d\x98\x44\xc7\xe9\x72\x19\x45\x75\x0d\x1c\x73\x21\x11\xe2\xa7\x02\x35\xc6\xe0\x57\x4f\xe0\x49\xd8\x02\xf0\x9b\x45\xc9\x61\x08\xf1\x17\x96\x3d\xb2\x29\xc6\x30\x4c\xc2\x4f\x38\x59\x2e\xa3\x41\x5d\x83\xc5\x59\x55\x32\x8b\x10\x17\xc8\x38\xea\x18\x12\xd2\x52\xd7\x40\x67\x83\x95\x4e\x48\xcc\x2a\xa5\x6d\x0c\x43\xb7\x95\xa6\x30\x39\x27\xe7\x2d\x6a\x03\x0b\xd4\x56\x64\x68\xe0\x81\x11\x0a\xca\x85\x23\xb4\x17\xc1\x92\x27\x51\x3e\x97\x19\x4c\xce\x47\x82\x43\x5d\xc3\x30\x99\x9c\x27\xb7\xcf\x15\xc2\x72\x39\x86\x4a\x23\x17\x19\xb3\x98\xb8\xad\x2b\x36\xa3\x75\xa8\xa3\x81\x46\x3b\xd7\xf2\x05\x81\x51\x34\x18\x50\xc4\x43\x3b\xab\x4a\xf8\x70\x0a\x95\x16\xd2\xe6\x10\x73\xc1\x4a\xcc\x6c\x7a\x64\xd2\xf6\x64\x2a\x38\x61\x70\x63\x95\x26\x0c\x08\x02\x77\xf8\x5b\x1b\xa0\x57\x33\xf4\xf0\x8c\x23\x1f\xbe\x66\x72\x8a\x30\x54\x15\xe9\x57\x95\x71\x9e\x43\x00\x70\xc8\xf4\x94\xd6\x63\xd2\xbd\x5c\xd6\x35\x88\x9c\x64\x93\xbf\x99\x16\x8c\x8b\xcc\x2f\x3a\x31\x27\x65\x82\x58\xc0\xd7\xe9\x70\xc0\xf4\x9c\x9f\x9c\x1f\x99\xd8\x69\x09\x61\x46\x83\x34\x85\x56\x72\xb9\x04\x56\x55\xa5\x40\xe3\x2a\x86\xd6\x3b\xd1\x0e\xa8\x90\x82\x5e\x02\x06\xee\x78\x4f\xcf\xa8\x71\x8d\xa0\xde\xe6\x7a\x92\x24\xad\xaf\xaf\xc8\xd9\xfe\xa4\x0d\xb6\xd4\xe9\x99\x9e\xc6\xde\x9d\xf8\xba\x72\xf1\x43\x1c\x92\xd5\xcf\x9b\x4b\x8e\xd3\x70\x70\xda\x53\x55\x99\x8d\xd4\x6f\x4f\x7e\x12\x36\x69\x8f\xfc\xf2\xd6\xc6\xd1\x60\x9d\x15\xa1\x2c\x72\x32\x3f\x4c\x3e\x11\xc2\x66\x23\xa3\xc3\x3c\xb9\xb1\x7a\x9e\x59\xb7\x1f\xb6\xd3\x63\xf8\xe3\xe6\xfa\x0a\x32\x26\xa5\xb2\xf0\x40\x3d\x64\x56\x31\x4d\xbd\xc3\x08\x39\x85\xf8\x34\x06\x26\x39\x5c\xc8\xf9\x0c\x0a\x66\x80\x81\x25\xd0\x3d\xdd\xb9\xc7\x8d\x52\xeb\xf2\x0a\x92\x60\x75\x3d\xc1\xd9\x2e\x98\xf9\x42\xb6\x49\xf7\x48\x69\xf2\x61\x62\x9c\x41\xf7\x8b\x94\x8e\x5b\x47\xbd\x65\xf6\x50\x62\x70\xf7\xa3\x92\xc4\x64\xe4\xb7\xea\x37\x66\x5c\x11\x78\x49\x6a\x6b\x59\xe9\xbc\xfc\x70\x0a\x23\xf2\x6f\x24\x31\x84\x1a\x7f\x66\x0f\x58\xc6\xe3\xfe\xd2\xa5\x52\x8f\x66\x75\xe9\x8b\x2a\x45\xf6\x1c\x8f\x1b\xfb\x27\x54\x72\xa4\xc9\x3b\xdd\xf7\xa6\x6f\x2f\x30\xb5\x23\xdb\x22\xf6\x6b\x2f\xb0\x02\xbf\xce\x59\x29\xec\x33\x64\x05\x66\x8f\x9b\x8c\xa8\x6b\xf8\x3a\x57\x94\xf2\xbc\xad\x5a\x4f\x11\x98\xd8\x9f\x0c\x08\x8e\xd2\x8a\x8c\x95\x60\x55\xdf\xc0\xc5\x9f\x49\x34\xd8\x47\xa2\x61\x7e\x10\x43\x9a\xe8\x87\x79\x72\xc9\xcc\xef\x2a\x9c\x71\x75\xb9\x70\xb5\xe3\x75\xb9\x24\xb8\xcd\x36\xea\xd0\xf2\x42\x4b\x59\x64\xf1\x5a\xc9\xfa\x7f\xfb\x29\xb8\x87\x83\xae\x64\x63\xaa\xf0\x86\x71\x87\x53\x2e\x0f\x67\xd7\x19\xb7\x93\x72\x6b\x9c\x23\xd2\x0d\x42\x99\x84\xb0\x5e\xc1\x40\x6a\xd4\x4d\xbf\xce\x9b\x55\x17\x6c\xeb\x54\x72\x5d\x99\xae\xb6\x48\xf2\x94\x4a\x08\x25\x37\xfe\xef\x28\x63\x65\xb9\x26\x3f\xcc\x5b\xf2\xf4\x5a\xf8\xca\x1d\xe1\xce\xae\xdf\x0f\x8b\x43\xae\x87\xc5\xde\xdb\x61\xbd\xa3\xac\x5c\x12\x2e\x3d\x54\x2a\x9e\xca\x54\x35\x24\x4c\x2d\xa5\xb5\xdd\xb4\x80\x60\xd8\x89\x9f\x82\xd5\x62\xd6\xcc\x06\x7e\xad\x9b\x15\x56\x1c\xfa\x8e\x7b\xe8\x65\xd6\x6d\xbf\x98\x44\xee\x5a\x98\xd3\x29\xca\x35\xb0\x0e\xbd\xb0\xac\xa7\x55\xbb\xb6\x93\x93\x0d\x25\x57\x55\x52\x29\x2e\x08\xd2\x19\x7b\xc4\xd1\xdd\xbd\x90\x16\x75\xce\x32\xac\x97\x3f\x43\x89\xb2\xc7\xff\x31\x95\xec\x20\x57\x1a\x04\x1d\xf0\x55\xb1\xf0\x7c\xef\xd8\xb6\xc2\xea\x51\xc3\xa3\x23\x73\x27\xee\x3d\xf7\xc6\x2d\x5d\x16\x77\xe2\x1e\x5c\x2b\x58\x25\x49\x69\x70\x8b\x4c\xf0\xe2\x4e\xdc\xaf\xd0\xc9\x0b\xb6\x2d\xa2\x2d\xb6\xb8\x1b\x81\x9c\xc2\xd0\x8b\x47\x6b\xa8\x8f\xb7\xf5\xa8\x7d\x2d\x6a\x6b\x87\x5a\x71\xe8\x7b\x47\x84\xae\x3d\xbd\xed\xb4\xe0\x4a\xf2\x6d\x06\x86\x5e\x93\xd8\xda\xb9\x3c\x51\x93\x0b\x3e\xc5\xcd\xd1\xc1\xd3\x3d\xbe\x64\xe4\x08\x6e\x8c\x11\x3b\x88\x78\xc9\x0c\xa9\xdc\xc5\x40\x6c\xeb\x1e\xf9\x14\xb7\x11\xf0\xed\xc7\x3b\xf2\x89\x42\x79\x7d\x4a\xc8\xc7\xb4\x60\x6f\x94\x11\x1f\x62\x67\xf2\xc8\xfc\x23\x6c\x11\xb7\xa1\xbf\x2d\xb6\x1e\x05\x06\x53\xb1\x40\x09\x99\x92\x5c\x58\xa1\xa4\x81\x91\xb2\x05\xea\x4e\x91\x19\x6f\x4b\x03\x6d\x1b\x48\x92\x64\x15\x6b\xf4\xcd\x3d\x18\xfa\x11\x73\xf5\xe4\x31\x7d\xbb\x91\x3b\x4d\xe1\x4c\x72\x98\x6a\x35\xaf\x4c\x0f\xb6\x6e\x1a\x3e\xbb\x3a\x07\x55\xa1\x66\x56\x69\x78\x40\xfb\x84\xe8\x72\x33\x0b\x9f\x9e\x67\x92\x8f\x7a\xe7\x36\x40\x3d\x04\xce\x57\x7c\x8d\xee\x01\x8a\xc9\xc3\xbe\x46\x93\xde\xd7\x68\x9a\xc2\xb5\xde\x05\xc1\xf5\x5f\x3b\x11\xb8\xd6\x3f\x10\x00\x4a\xff\x97\xf8\xaf\x94\x5d\x21\x24\x5d\x56\x6d\xc8\x81\x8b\x9e\x6b\x9d\x8b\x3e\xf8\x2b\x65\x47\xd5\x0b\x8e\xff\x3f\x11\x4b\x65\x5f\x1d\xf2\xca\xfb\x8b\x7b\xe7\x49\x19\xf7\x3d\x84\x95\xcd\x4b\x4c\x3b\xda\xd2\x71\xe3\x67\x15\x9b\x15\xb7\x2f\x1e\x4c\x8f\xe3\xb5\xd1\xb5\x21\x77\x50\xd1\x8c\xc5\x9b\x6f\x23\xcb\x1d\xf7\x5a\xf7\x33\x3d\x86\xb3\xce\x71\x5b\x30\x4b\x9f\xbb\xf4\xad\xab\x16\xa8\xb5\xe0\x1c\x25\x08\x09\x4a\xbb\xc7\x32\x05\x8c\x73\xe8\xfc\xf3\xaf\x6a\x34\x48\x51\x3e\xdd\x10\x57\xf9\x71\x34\xf1\x5f\xba\xeb\x8f\x5f\x2b\xa0\xf4\x27\xd6\x7f\x03\x00\x00\xff\xff\x7f\xa8\x59\x19\xea\x13\x00\x00") func templateWhereTmplBytes() ([]byte, error) { return bindataRead( @@ -1226,7 +1226,7 @@ func templateWhereTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/where.tmpl", size: 5001, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/where.tmpl", size: 5098, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/dialect/gremlin/meta.tmpl b/entc/gen/template/dialect/gremlin/meta.tmpl index e31990c04..7cf3d7ddd 100644 --- a/entc/gen/template/dialect/gremlin/meta.tmpl +++ b/entc/gen/template/dialect/gremlin/meta.tmpl @@ -6,7 +6,7 @@ in the LICENSE file in the root directory of this source tree. {{/* constants needed for gremlin dialects. */}} {{ define "dialect/gremlin/meta/constants" }} - {{ range $_, $e := $.Edges }}{{ $label := $e.LabelConstant -}} + {{ range $e := $.Edges }}{{ $label := $e.LabelConstant -}} {{ if $e.IsInverse }}{{- $label = $e.InverseLabelConstant -}} // {{ $label }} holds the string label denoting the {{ lower $e.Name }} inverse edge type in the database. {{ else -}} diff --git a/entc/gen/template/where.tmpl b/entc/gen/template/where.tmpl index c0720338f..9f1bf5647 100644 --- a/entc/gen/template/where.tmpl +++ b/entc/gen/template/where.tmpl @@ -35,12 +35,13 @@ func ID(id {{ $.ID.Type }}) predicate.{{ $.Name }} { {{ end }} {{ range $f := $.Fields }} + {{ $func := $f.StructField }} {{/* JSON cannot be compared using "=" and Enum has a type defined with the field name */}} {{ $hasP := not (or $f.IsJSON $f.IsEnum) }} {{ $comparable := $f.ConvertedToBasic }} - {{- if and $hasP $comparable }} + {{ $undeclared := (and (ne $func "Label") (ne $func "Hooks") (ne $func "Policy")) }} + {{- if and $hasP $comparable $undeclared }} {{ $arg := "v" }} - {{ $func := $f.StructField }} // {{ $func }} applies equality check predicate on the {{ quote $f.Name }} field. It's identical to {{ $func }}EQ. func {{ $func }}({{ $arg }} {{ $f.Type }}) predicate.{{ $.Name }} { {{- if $f.HasGoType }} diff --git a/entc/integration/config/ent/migrate/schema.go b/entc/integration/config/ent/migrate/schema.go index c82c4c79d..e5fd9fa3d 100644 --- a/entc/integration/config/ent/migrate/schema.go +++ b/entc/integration/config/ent/migrate/schema.go @@ -17,6 +17,7 @@ var ( UsersColumns = []*schema.Column{ {Name: "user_id", Type: field.TypeInt}, {Name: "name", Type: field.TypeString, Nullable: true, Size: 128}, + {Name: "label", Type: field.TypeString, Nullable: true}, } // UsersTable holds the schema information for the "Users" table. UsersTable = &schema.Table{ diff --git a/entc/integration/config/ent/mutation.go b/entc/integration/config/ent/mutation.go index 46b7b5574..2bbffd937 100644 --- a/entc/integration/config/ent/mutation.go +++ b/entc/integration/config/ent/mutation.go @@ -36,6 +36,7 @@ type UserMutation struct { typ string id *int name *string + label *string clearedFields map[string]struct{} done bool oldValue func(context.Context) (*User, error) @@ -176,6 +177,55 @@ func (m *UserMutation) ResetName() { delete(m.clearedFields, user.FieldName) } +// SetLabel sets the "label" field. +func (m *UserMutation) SetLabel(s string) { + m.label = &s +} + +// Label returns the value of the "label" field in the mutation. +func (m *UserMutation) Label() (r string, exists bool) { + v := m.label + if v == nil { + return + } + return *v, true +} + +// OldLabel returns the old "label" field's value of the User entity. +// If the User object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *UserMutation) OldLabel(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, fmt.Errorf("OldLabel is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, fmt.Errorf("OldLabel requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldLabel: %w", err) + } + return oldValue.Label, nil +} + +// ClearLabel clears the value of the "label" field. +func (m *UserMutation) ClearLabel() { + m.label = nil + m.clearedFields[user.FieldLabel] = struct{}{} +} + +// LabelCleared returns if the "label" field was cleared in this mutation. +func (m *UserMutation) LabelCleared() bool { + _, ok := m.clearedFields[user.FieldLabel] + return ok +} + +// ResetLabel resets all changes to the "label" field. +func (m *UserMutation) ResetLabel() { + m.label = nil + delete(m.clearedFields, user.FieldLabel) +} + // Op returns the operation name. func (m *UserMutation) Op() Op { return m.op @@ -190,10 +240,13 @@ func (m *UserMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *UserMutation) Fields() []string { - fields := make([]string, 0, 1) + fields := make([]string, 0, 2) if m.name != nil { fields = append(fields, user.FieldName) } + if m.label != nil { + fields = append(fields, user.FieldLabel) + } return fields } @@ -204,6 +257,8 @@ func (m *UserMutation) Field(name string) (ent.Value, bool) { switch name { case user.FieldName: return m.Name() + case user.FieldLabel: + return m.Label() } return nil, false } @@ -215,6 +270,8 @@ func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, er switch name { case user.FieldName: return m.OldName(ctx) + case user.FieldLabel: + return m.OldLabel(ctx) } return nil, fmt.Errorf("unknown User field %s", name) } @@ -231,6 +288,13 @@ func (m *UserMutation) SetField(name string, value ent.Value) error { } m.SetName(v) return nil + case user.FieldLabel: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetLabel(v) + return nil } return fmt.Errorf("unknown User field %s", name) } @@ -264,6 +328,9 @@ func (m *UserMutation) ClearedFields() []string { if m.FieldCleared(user.FieldName) { fields = append(fields, user.FieldName) } + if m.FieldCleared(user.FieldLabel) { + fields = append(fields, user.FieldLabel) + } return fields } @@ -281,6 +348,9 @@ func (m *UserMutation) ClearField(name string) error { case user.FieldName: m.ClearName() return nil + case user.FieldLabel: + m.ClearLabel() + return nil } return fmt.Errorf("unknown User nullable field %s", name) } @@ -292,6 +362,9 @@ func (m *UserMutation) ResetField(name string) error { case user.FieldName: m.ResetName() return nil + case user.FieldLabel: + m.ResetLabel() + return nil } return fmt.Errorf("unknown User field %s", name) } diff --git a/entc/integration/config/ent/schema/user.go b/entc/integration/config/ent/schema/user.go index 3afc45a4f..c6cdf061d 100644 --- a/entc/integration/config/ent/schema/user.go +++ b/entc/integration/config/ent/schema/user.go @@ -46,6 +46,8 @@ func (User) Fields() []ent.Field { Size: 128, }).Comment(`Comment line1 Comment line2`), + field.String("label"). + Optional(), } } diff --git a/entc/integration/config/ent/user.go b/entc/integration/config/ent/user.go index caa2d3f2d..32dd15a4c 100644 --- a/entc/integration/config/ent/user.go +++ b/entc/integration/config/ent/user.go @@ -23,6 +23,8 @@ type User struct { // Comment line1 // Comment line2 Name string `json:"name,omitempty"` + // Label holds the value of the "label" field. + Label string `json:"label,omitempty"` } // scanValues returns the types for scanning values from sql.Rows. @@ -32,7 +34,7 @@ func (*User) scanValues(columns []string) ([]interface{}, error) { switch columns[i] { case user.FieldID: values[i] = &sql.NullInt64{} - case user.FieldName: + case user.FieldName, user.FieldLabel: values[i] = &sql.NullString{} default: return nil, fmt.Errorf("unexpected column %q for type User", columns[i]) @@ -61,6 +63,12 @@ func (u *User) assignValues(columns []string, values []interface{}) error { } else if value.Valid { u.Name = value.String } + case user.FieldLabel: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field label", values[i]) + } else if value.Valid { + u.Label = value.String + } } } return nil @@ -91,6 +99,8 @@ func (u *User) String() string { builder.WriteString(fmt.Sprintf("id=%v", u.ID)) builder.WriteString(", name=") builder.WriteString(u.Name) + builder.WriteString(", label=") + builder.WriteString(u.Label) builder.WriteByte(')') return builder.String() } diff --git a/entc/integration/config/ent/user/user.go b/entc/integration/config/ent/user/user.go index 30ea00ef4..af72881ef 100644 --- a/entc/integration/config/ent/user/user.go +++ b/entc/integration/config/ent/user/user.go @@ -13,6 +13,8 @@ const ( FieldID = "user_id" // FieldName holds the string denoting the name field in the database. FieldName = "name" + // FieldLabel holds the string denoting the label field in the database. + FieldLabel = "label" // Table holds the table name of the user in the database. Table = "Users" @@ -22,6 +24,7 @@ const ( var Columns = []string{ FieldID, FieldName, + FieldLabel, } // ValidColumn reports if the column name is valid (part of the table columns). diff --git a/entc/integration/config/ent/user/where.go b/entc/integration/config/ent/user/where.go index 33917c9e9..77aabc6c9 100644 --- a/entc/integration/config/ent/user/where.go +++ b/entc/integration/config/ent/user/where.go @@ -226,6 +226,131 @@ func NameContainsFold(v string) predicate.User { }) } +// LabelEQ applies the EQ predicate on the "label" field. +func LabelEQ(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.EQ(s.C(FieldLabel), v)) + }) +} + +// LabelNEQ applies the NEQ predicate on the "label" field. +func LabelNEQ(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.NEQ(s.C(FieldLabel), v)) + }) +} + +// LabelIn applies the In predicate on the "label" field. +func LabelIn(vs ...string) predicate.User { + v := make([]interface{}, len(vs)) + for i := range v { + v[i] = vs[i] + } + return predicate.User(func(s *sql.Selector) { + // if not arguments were provided, append the FALSE constants, + // since we can't apply "IN ()". This will make this predicate falsy. + if len(v) == 0 { + s.Where(sql.False()) + return + } + s.Where(sql.In(s.C(FieldLabel), v...)) + }) +} + +// LabelNotIn applies the NotIn predicate on the "label" field. +func LabelNotIn(vs ...string) predicate.User { + v := make([]interface{}, len(vs)) + for i := range v { + v[i] = vs[i] + } + return predicate.User(func(s *sql.Selector) { + // if not arguments were provided, append the FALSE constants, + // since we can't apply "IN ()". This will make this predicate falsy. + if len(v) == 0 { + s.Where(sql.False()) + return + } + s.Where(sql.NotIn(s.C(FieldLabel), v...)) + }) +} + +// LabelGT applies the GT predicate on the "label" field. +func LabelGT(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.GT(s.C(FieldLabel), v)) + }) +} + +// LabelGTE applies the GTE predicate on the "label" field. +func LabelGTE(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.GTE(s.C(FieldLabel), v)) + }) +} + +// LabelLT applies the LT predicate on the "label" field. +func LabelLT(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.LT(s.C(FieldLabel), v)) + }) +} + +// LabelLTE applies the LTE predicate on the "label" field. +func LabelLTE(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.LTE(s.C(FieldLabel), v)) + }) +} + +// LabelContains applies the Contains predicate on the "label" field. +func LabelContains(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.Contains(s.C(FieldLabel), v)) + }) +} + +// LabelHasPrefix applies the HasPrefix predicate on the "label" field. +func LabelHasPrefix(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.HasPrefix(s.C(FieldLabel), v)) + }) +} + +// LabelHasSuffix applies the HasSuffix predicate on the "label" field. +func LabelHasSuffix(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.HasSuffix(s.C(FieldLabel), v)) + }) +} + +// LabelIsNil applies the IsNil predicate on the "label" field. +func LabelIsNil() predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.IsNull(s.C(FieldLabel))) + }) +} + +// LabelNotNil applies the NotNil predicate on the "label" field. +func LabelNotNil() predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.NotNull(s.C(FieldLabel))) + }) +} + +// LabelEqualFold applies the EqualFold predicate on the "label" field. +func LabelEqualFold(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.EqualFold(s.C(FieldLabel), v)) + }) +} + +// LabelContainsFold applies the ContainsFold predicate on the "label" field. +func LabelContainsFold(v string) predicate.User { + return predicate.User(func(s *sql.Selector) { + s.Where(sql.ContainsFold(s.C(FieldLabel), v)) + }) +} + // And groups predicates with the AND operator between them. func And(predicates ...predicate.User) predicate.User { return predicate.User(func(s *sql.Selector) { diff --git a/entc/integration/config/ent/user_create.go b/entc/integration/config/ent/user_create.go index a2b623077..bb3b67867 100644 --- a/entc/integration/config/ent/user_create.go +++ b/entc/integration/config/ent/user_create.go @@ -36,6 +36,20 @@ func (uc *UserCreate) SetNillableName(s *string) *UserCreate { return uc } +// SetLabel sets the "label" field. +func (uc *UserCreate) SetLabel(s string) *UserCreate { + uc.mutation.SetLabel(s) + return uc +} + +// SetNillableLabel sets the "label" field if the given value is not nil. +func (uc *UserCreate) SetNillableLabel(s *string) *UserCreate { + if s != nil { + uc.SetLabel(*s) + } + return uc +} + // SetID sets the "id" field. func (uc *UserCreate) SetID(i int) *UserCreate { uc.mutation.SetID(i) @@ -134,6 +148,14 @@ func (uc *UserCreate) createSpec() (*User, *sqlgraph.CreateSpec) { }) _node.Name = value } + if value, ok := uc.mutation.Label(); ok { + _spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{ + Type: field.TypeString, + Value: value, + Column: user.FieldLabel, + }) + _node.Label = value + } return _node, _spec } diff --git a/entc/integration/config/ent/user_update.go b/entc/integration/config/ent/user_update.go index 97b13bd4d..848632800 100644 --- a/entc/integration/config/ent/user_update.go +++ b/entc/integration/config/ent/user_update.go @@ -50,6 +50,26 @@ func (uu *UserUpdate) ClearName() *UserUpdate { return uu } +// SetLabel sets the "label" field. +func (uu *UserUpdate) SetLabel(s string) *UserUpdate { + uu.mutation.SetLabel(s) + return uu +} + +// SetNillableLabel sets the "label" field if the given value is not nil. +func (uu *UserUpdate) SetNillableLabel(s *string) *UserUpdate { + if s != nil { + uu.SetLabel(*s) + } + return uu +} + +// ClearLabel clears the value of the "label" field. +func (uu *UserUpdate) ClearLabel() *UserUpdate { + uu.mutation.ClearLabel() + return uu +} + // Mutation returns the UserMutation object of the builder. func (uu *UserUpdate) Mutation() *UserMutation { return uu.mutation @@ -137,6 +157,19 @@ func (uu *UserUpdate) sqlSave(ctx context.Context) (n int, err error) { Column: user.FieldName, }) } + if value, ok := uu.mutation.Label(); ok { + _spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{ + Type: field.TypeString, + Value: value, + Column: user.FieldLabel, + }) + } + if uu.mutation.LabelCleared() { + _spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{ + Type: field.TypeString, + Column: user.FieldLabel, + }) + } if n, err = sqlgraph.UpdateNodes(ctx, uu.driver, _spec); err != nil { if _, ok := err.(*sqlgraph.NotFoundError); ok { err = &NotFoundError{user.Label} @@ -175,6 +208,26 @@ func (uuo *UserUpdateOne) ClearName() *UserUpdateOne { return uuo } +// SetLabel sets the "label" field. +func (uuo *UserUpdateOne) SetLabel(s string) *UserUpdateOne { + uuo.mutation.SetLabel(s) + return uuo +} + +// SetNillableLabel sets the "label" field if the given value is not nil. +func (uuo *UserUpdateOne) SetNillableLabel(s *string) *UserUpdateOne { + if s != nil { + uuo.SetLabel(*s) + } + return uuo +} + +// ClearLabel clears the value of the "label" field. +func (uuo *UserUpdateOne) ClearLabel() *UserUpdateOne { + uuo.mutation.ClearLabel() + return uuo +} + // Mutation returns the UserMutation object of the builder. func (uuo *UserUpdateOne) Mutation() *UserMutation { return uuo.mutation @@ -267,6 +320,19 @@ func (uuo *UserUpdateOne) sqlSave(ctx context.Context) (_node *User, err error) Column: user.FieldName, }) } + if value, ok := uuo.mutation.Label(); ok { + _spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{ + Type: field.TypeString, + Value: value, + Column: user.FieldLabel, + }) + } + if uuo.mutation.LabelCleared() { + _spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{ + Type: field.TypeString, + Column: user.FieldLabel, + }) + } _node = &User{config: uuo.config} _spec.Assign = _node.assignValues _spec.ScanValues = _node.scanValues