diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index 3e1299ae8..284f8c070 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -761,7 +761,7 @@ func templateDialectSqlPredicateTmpl() (*asset, error) { return a, nil } -var _templateDialectSqlQueryTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\x6d\x6f\xdb\x46\xf2\x7f\x4d\x7d\x8a\x29\xe1\x7f\x21\x0a\x32\x6d\xe7\x7f\x38\xe0\x14\xf8\x00\x5f\x1c\x03\x42\xda\x34\x57\xa7\xed\x0b\x43\x68\x69\x72\x28\x2f\x44\x2d\x15\x72\xe5\xd8\x50\xf8\xdd\x0f\x33\xfb\xc0\xa5\x44\xc9\x4e\xda\xe6\xee\x80\x7b\x91\x58\xda\x9d\xdd\x99\x9d\x87\xdf\xce\xcc\x6a\xb3\x39\x19\x0d\x5e\x95\xab\xc7\x4a\xcc\xef\x14\xbc\x38\x3d\xfb\xdb\xf1\xaa\xc2\x1a\xa5\x82\xab\x24\xc5\xdb\xb2\x5c\xc0\x54\xa6\x31\x5c\x14\x05\x30\x51\x0d\x34\x5f\xdd\x63\x16\x0f\xde\xdf\x89\x1a\xea\x72\x5d\xa5\x08\x69\x99\x21\x88\x1a\x0a\x91\xa2\xac\x31\x83\xb5\xcc\xb0\x02\x75\x87\x70\xb1\x4a\xd2\x3b\x84\x17\xf1\xa9\x9d\x85\xbc\x5c\xcb\x6c\x20\x24\xcf\x7f\x37\x7d\xf5\xfa\xed\xf5\x6b\xc8\x45\x81\x60\xc6\xaa\xb2\x54\x90\x89\x0a\x53\x55\x56\x8f\x50\xe6\xa0\x3c\x66\xaa\x42\x8c\x07\xa3\x93\xa6\x19\x0c\xe8\x0c\x70\x91\x65\x42\x89\x52\x26\x05\xe4\x02\x8b\xac\x86\xbc\xd4\xcc\x6f\xd7\xa2\xc8\xb0\x8a\x81\xa9\x37\x1b\xc8\x30\x17\x12\x21\xcc\x44\x52\x60\xaa\x4e\xea\x0f\xc5\xc9\x87\x35\x56\x8f\x27\x7a\x65\x08\x4d\x33\x08\x36\x9b\x63\xf8\x28\xd4\x1d\x1c\xc5\x57\x65\x85\x62\x2e\xdf\xe0\x63\xcd\x53\x01\x8d\x5f\xbd\xa9\xe1\xb6\x2c\x0b\x4d\x89\x32\x03\xde\xdd\x7d\x3c\xc8\x29\xd4\xc4\x70\xb4\x5a\xcc\x61\x72\x0e\x47\xf1\x75\x5a\xae\x30\x7e\x97\xa4\x8b\x64\x8e\x76\xd6\x88\x4e\x14\xab\xa4\x4e\x93\xc2\x11\xfe\xc3\xcc\x18\xc2\x0a\x53\x14\xf7\x9a\xd2\x7d\x76\xcb\x49\x9a\x7c\x2d\x53\x18\x76\x68\x9b\x06\x46\x3e\x97\xa6\x89\xa0\xfe\x50\x5c\x14\xc5\x30\x55\x0f\x90\x96\x52\xe1\x83\x8a\x5f\xe9\xbf\x11\x0c\x6f\x66\x4c\x1f\xbf\x4d\x96\x24\xe2\x18\xb0\xaa\xca\x2a\x82\xcd\x20\xb8\x4f\x2a\x18\x0e\x82\x40\x96\x19\xd6\xb0\x45\x38\x08\x0e\x6a\xd3\xa9\xf3\x1c\xb6\xe4\x8b\xcd\x8c\xd9\xc0\x68\x36\x08\x7e\xad\x57\x98\xf6\x90\xb3\x6e\xaf\x57\x98\x0e\xa3\x41\x10\x1d\xb6\x61\x67\xf2\xcd\xeb\x6c\x8e\x76\x22\x10\x39\xed\x5c\x25\x72\x8e\x70\x24\xc6\x70\x84\xa4\xd7\x18\x9a\x66\xb3\x01\x91\xc3\x5c\xc1\x91\x80\x53\x52\xe0\xa7\x4f\x44\xaa\x05\xeb\x13\x7e\xb3\x71\x96\x43\xab\x0e\xf8\xe6\x1c\xa4\x28\xdc\x3a\xd2\x5f\xd0\x51\x83\xaa\xd6\xc8\x63\x4e\x50\x77\x74\x12\xce\x12\xea\x75\xac\x8c\xf8\x6d\x99\x61\xfc\xaa\x2c\xd6\x4b\x49\x3b\x24\xab\x15\xca\x6c\xb8\x3b\x37\x66\xa5\x79\x8e\xe6\x6b\x26\x8e\xe3\x68\xa0\xd9\xfa\x4c\xf5\x2e\xd7\x69\x22\x7f\x4e\x8a\x35\xd2\xfe\xe4\x4e\xc3\x08\x6e\x66\x42\x2a\xac\xf2\x24\xc5\x8d\x3e\x07\x39\x00\x69\xeb\x5b\xdf\x01\x36\x69\x29\x73\x31\x9f\xec\x18\x4c\x8f\x37\xce\x71\x9c\xe0\xfc\x75\x0c\xf4\x87\x24\xba\xd7\x7c\x27\xe7\x3c\x12\xd7\x4e\x14\x32\xf4\x61\x33\xef\xe8\xeb\xde\x9e\xc1\xb0\xd2\xdf\x35\xaf\x38\x5f\xd8\x7d\x3d\x5d\x74\x2d\x50\xa1\x5a\x57\x12\xf4\xb2\x41\xe0\xf4\x73\x51\xd7\x62\x2e\xad\x6e\x0c\x97\x38\x8e\x3d\x0d\x45\x3a\x62\x58\x10\x91\x43\x81\x52\x1f\x34\x82\xf3\x73\x38\xd5\xf2\x99\xed\xf3\xa5\x8a\x5f\x13\x71\x3e\x0c\x2d\x50\x34\xcd\x04\x0c\x97\x34\x29\x0a\xcc\xf8\x64\xe5\x5a\xf1\x57\x21\xe7\xd0\xda\x28\x24\xe1\x1b\xcf\x20\xcc\xe8\xa6\x65\x79\x7c\x36\x6b\x0f\xc3\x67\x4f\x78\x6b\x73\x7e\x2d\xbf\x56\x42\x33\x20\x69\xb1\x62\x78\xa9\x3f\x14\xf3\x2a\x59\xdd\xc5\xff\xa4\x60\x23\xd7\xaa\x09\x2e\xc6\x3b\xb6\xcd\x2a\xfa\x34\x06\xd6\x4e\xf4\x92\xd7\x6b\xcf\xe7\x83\x5a\xce\xa2\x60\x1c\x19\x58\xa7\x33\x61\x87\x1a\x16\xbd\xb8\x74\x56\xc6\x07\x45\xc6\x38\x82\xf0\x47\x4c\x43\x8f\x69\x48\xd4\x21\xad\xb5\x11\x0e\x0a\x97\xab\x22\x51\xbd\x68\x8f\xc9\x1c\xab\xa2\x4c\x32\x21\xe7\x21\x87\xf7\x96\xa9\xfd\xcf\x9e\xa2\xc8\x57\x44\x31\xf8\x2c\x50\x7d\x55\xae\xa5\xda\x03\xab\x42\x2a\x1f\x4a\x35\xb8\x4d\x9e\x40\x37\x23\x8f\xb3\x06\x33\x78\xb6\x35\x3e\x4f\xf8\xd7\x0f\xa2\xde\x27\x3c\x5d\x81\xbe\xf4\x72\x6c\x1d\x65\x5b\x02\x5f\x0b\x91\xf3\xa8\x5d\x8f\xc8\x93\xa2\xc6\xf1\xde\x00\x48\xef\x30\x5d\x00\x92\x48\x28\x53\x9c\xc0\xff\xdd\x87\xcc\x53\x3b\xaa\xb5\x13\xfc\x1d\x4e\x3f\xd7\x4e\x9e\x82\x61\xd4\xf5\x73\x1a\xed\x18\xe7\xdb\xdd\x79\x3a\x03\x59\x60\xe2\x4d\xd2\x77\x3b\x17\xbc\x4f\x6e\x0b\x9c\xec\x00\x30\x0f\x8f\x89\xc0\x60\xf4\x2e\x89\x05\x6f\x22\x9a\x5e\xfa\x0c\xae\x28\x65\x71\x1c\x82\xf7\x8f\x2b\x9c\xe8\x0c\x28\xe6\x4d\xa6\x97\x31\x8d\x91\xc5\x6a\x65\x2f\x6e\x26\xd5\x7b\xee\xf2\xb2\xcb\x78\x45\x22\x95\x5d\xc0\xff\xf3\x7f\x57\x55\xb9\xdc\xc5\xf2\xfa\x43\x41\x93\x3f\x49\xf1\x61\x8d\x13\xbe\xc3\xc6\x16\x3b\x56\x75\x9f\x47\xac\x2a\xcc\x44\x9a\x28\xac\x5f\x32\x16\xae\xea\x88\xcc\xc6\xce\xa0\x31\xf5\x9d\xa5\xb0\xb0\x5a\x63\xc1\x09\x21\xdb\x27\xbe\x36\xdf\x22\x0d\x9d\x94\xf1\x09\x4e\x81\x18\x43\x56\x16\xf1\x57\xf5\x8d\x98\xb9\xa5\x0e\xd5\x1b\x2b\x5d\x21\x96\x42\xf5\x09\xc8\x13\x2f\xcd\xbc\xe7\xa9\x5a\xb8\xef\x78\xf8\x1c\x46\x3c\x6f\x37\x2b\xf3\xbc\xc6\xde\xdd\xf4\xcc\x4b\x4b\xb1\xb3\xdf\x0f\x7a\xfc\x1c\x46\x9a\xe2\xb0\xf2\xca\x2a\xc3\x6a\x9f\xde\x7e\xa0\xc9\x3f\x4f\x67\x26\xc8\x98\xd7\xe7\x41\x09\x07\x8b\x09\x2f\x27\x0a\xb1\xf4\x52\x5d\x9a\xba\xd4\x68\xbd\xbd\xa7\x81\x31\x37\x1d\x45\x83\x40\x9d\xd1\x22\x9b\xe5\x73\x30\x0d\x7b\x43\x2c\x1a\x04\x4e\x15\xde\x0a\x2d\xc5\x50\x9d\xd9\x28\xdb\x59\x6d\xc6\xe9\x32\xe4\x7f\xe4\xff\x43\x75\xa6\x41\xac\x27\x0c\x7c\xd3\x3a\x8e\xbd\x80\xe8\x11\x58\x39\xdc\xf7\x67\x4a\xc3\x06\x21\x2b\xfe\x3a\x86\x55\x6b\xc8\xfd\xb1\xc6\x62\xad\x7c\xd3\x3e\x6b\x03\xf6\xb7\xde\xb5\x5f\xe8\xf4\x27\x27\x26\xb0\x44\x0d\xcb\x44\x66\x09\xd7\x79\x24\x88\xa1\x4d\x8b\x64\x5d\x63\x0c\xbf\x20\xd4\x2a\xa9\x94\x5e\xc3\x29\x40\x86\x79\xb2\x2e\x94\x4e\xc2\xc6\x90\xc8\x0c\xca\x7b\xac\x2a\x41\x25\xa8\x82\x5b\x2c\xca\x8f\x94\xa9\x4b\xc4\x8c\xea\x54\x4f\xcd\x3a\xca\x86\x26\xc6\x22\x1d\xc5\xc3\x65\xa2\xee\xe2\xef\x93\x87\xa9\x54\xff\xff\x22\xfa\x62\x60\x70\x5c\xf4\xae\x1a\x19\x3a\x17\x93\xa5\x18\x70\xe1\xd6\xd6\x8a\x27\x23\x7d\xfd\x9c\xac\x12\x7d\x3e\x21\xb1\xe6\xfa\x95\x87\x61\x8e\x12\xab\x84\x2a\x5c\x56\x11\x53\x95\x39\x24\x30\x17\xf7\x28\x01\xb3\x39\x3e\xa7\xc2\xa5\x75\x6d\x7d\x7b\x24\x39\xcb\xe2\x1a\x84\x24\x20\x76\x9c\x2f\x7e\x34\x2a\xf7\x04\xc8\xab\x72\x69\x38\xe8\xb5\xe8\x17\xae\x94\x79\x75\xb6\x21\x81\x68\x1b\xb2\x00\xa8\x92\xe5\x9f\x57\x84\xe4\x34\xcb\xe2\xab\xb2\xb3\x9f\x5f\xc3\xda\x6d\x7f\x6c\x75\x3e\x08\x6a\x85\xab\x4e\x06\xfa\x16\x3f\x5e\x2b\x5c\x51\xdd\xd9\xde\x87\x14\x9b\x64\x2e\xb9\x7b\xc5\xc2\xce\xb8\x1e\xd8\xba\xec\xfa\x02\xd5\xe0\x56\x34\xf6\x79\xbd\x2f\x99\x13\xea\x1b\xb6\x9f\xdd\xee\xa4\x37\xda\x65\xdc\xdd\x9c\x34\x3a\x74\xdf\xf4\xa2\x1f\xb1\xe0\x85\x4e\x4a\x8c\xa7\xf5\x54\xde\x63\x55\xb7\x63\x3b\x07\x44\x2d\xcf\xf6\x7d\x4e\x4a\x17\x39\x4d\x7f\xff\xe2\x7b\x38\x36\xb5\xef\x9e\x1d\xde\xbd\xf1\x96\xc7\x71\xec\xea\xd2\xa2\xc6\xa7\xd6\x6a\xc0\xf2\xd6\xfb\x45\xad\x5e\x4b\x47\x8f\x06\x01\x7b\x1a\x23\xa8\x67\xe5\x6b\x54\x6f\x51\xcc\xef\x6e\xcb\xaa\x7e\xf2\x3e\x18\x03\x79\x49\xb4\x27\xb6\xc8\x87\x9f\x8e\xad\x44\x87\x93\xe7\xf7\x2e\xcc\xb8\x4e\x7a\x4e\x23\xa9\x2a\x97\xff\x8d\x61\xc6\xd6\x10\x59\x1f\xe4\x59\x77\xe1\x70\x99\xd6\xd7\xaa\xa2\x82\xb3\x69\x44\x36\x8c\x48\xdb\x05\xbb\xe0\xf4\xb2\xd5\xfc\xd7\x0b\x58\x91\xfd\x2f\x30\xbf\x7e\x60\xfe\xce\xa8\x3c\x10\x3e\xdd\xca\xfc\x60\x28\x1c\xf6\x6a\x26\x10\xb9\x89\xad\x1e\xaf\xde\xd7\xa3\x7b\x69\x96\x78\x77\x7b\xd7\x2c\x5a\x59\xf9\x82\x73\xf3\x65\xb2\xc0\xe1\xcd\xcc\x1c\xfb\x67\x9d\x94\x9c\x8e\xbd\x06\x0f\x27\xd0\x22\x6b\xa9\x97\xc9\xea\xc6\x2f\xd0\xa0\x69\xb6\xbb\xab\x5b\xab\x4d\x8a\x66\xfb\x39\x3a\x4b\xd3\x6d\x33\x9d\xb2\x8b\xac\xbe\x61\x80\x9a\x5e\xce\x40\x37\x7c\x78\x9c\x84\x74\xdd\xae\x7c\x61\x5b\x5d\xd3\x4b\x97\xd5\xbb\xf6\x6d\x10\x10\xa0\x90\x9c\x37\xb3\x6e\x38\x18\x19\x1d\x0d\x6d\xd9\x39\xc8\x0e\xe9\x6c\xab\x0b\xcc\xdc\xf8\xbf\x9e\x22\x9a\xac\xd9\x29\xa4\x83\x80\x86\x26\x5b\x24\xed\x6c\x60\xa2\x6b\xd2\x17\x6e\x9a\x62\x4f\xb9\x7d\x20\xf2\x0e\x54\xe0\x3d\xd1\xa6\x97\x98\x3f\xae\x52\x9d\x98\xa2\xab\xb7\xda\x0a\x82\x3a\xfe\xe5\x0e\x2b\x06\x90\x78\x6a\x9b\x6d\xcf\x60\x76\xa3\x5b\xcf\x5b\x27\x3d\x6b\x91\xf7\xd4\x05\xd7\x6c\x0c\xf9\x82\xeb\x83\xc8\x97\x90\x36\x2d\xd7\x9c\xce\x86\xc4\xfd\xed\xba\x28\xa6\x52\xfd\xf5\x2f\xa1\x6b\x6c\xb3\x37\xfe\x54\x63\x75\xc9\xa1\x69\x9b\xda\xb4\xea\x5c\x4f\xd2\x22\x63\x5f\x0f\xe8\xcd\xee\x42\x1e\xdc\xbc\xf5\x90\x5d\x16\x42\x12\x87\x96\x62\x2f\x9f\xb6\xc3\x39\x71\x4d\xe8\x17\x7e\x17\xda\xe8\xd9\xa4\xdb\x5b\x73\xdf\xda\xe3\x34\xcd\xa6\x19\xeb\x26\xb5\x90\xfc\xad\xf1\x75\xa5\xbb\xac\x86\x43\xb9\x56\x63\x10\x12\xf6\x34\x72\x29\x20\x98\xa4\x5c\xd0\xf1\xcb\xb5\x8a\x87\xa3\x96\x8f\xb6\x01\x81\xd0\x37\xe5\x02\x3e\x7d\x02\x64\x75\xb6\xb8\x12\xf4\x37\x7d\xd7\x12\x1f\x56\x98\x2a\xcc\x40\x64\xba\xd0\xe1\xec\x84\x82\xef\xb8\x5c\xab\xd0\x6c\xdc\x18\x11\x84\xb4\x12\x08\x69\x04\xe0\x93\xed\xf2\x27\x5d\xff\x3e\xf6\x42\x6e\x71\x2f\xd7\x8a\x8d\x62\x20\x76\xab\x4d\x7b\x51\xcd\x43\x08\xe9\xdc\x21\x84\xdc\xb0\x0a\xd9\x9b\x20\xb4\x66\x0e\x9d\x55\x9e\xdf\xb2\x3d\x59\xbe\x58\xea\x96\x75\x68\xdf\x66\x3c\x3f\x09\x84\x7c\x5a\x22\x21\x3d\x81\x9c\xf3\x75\xc4\xd2\xde\xf1\x87\x49\x45\xc8\xeb\xec\x94\xd5\x37\x56\x71\xb3\x8e\x95\x9e\x67\x17\xbe\x09\x44\x46\xae\xc9\x88\x6c\x5a\xa1\x76\xcb\x2d\xff\x30\xb8\xee\x2e\x02\x33\x40\x9e\xed\x93\xf3\x4e\x37\x66\x6c\xd6\x25\x6f\xc7\xdb\x97\x99\xc0\xef\xe4\x7b\x21\x64\xdf\x5e\x7a\x5f\x0d\xb8\xab\xff\x45\xaf\x06\xdd\x77\x03\x4f\x31\xbf\xe9\xfb\x5a\x5f\x4d\xa1\x06\x50\x73\xf1\x84\xa4\x98\xdf\x6c\x8f\xd8\x88\xa6\x33\x1a\x8d\xc5\xfd\xe9\xe0\xf4\x72\x2a\xad\x96\x1c\x98\x4a\x9b\xf3\xb8\x36\xb7\xde\xc8\x3c\x9a\x46\xde\xa9\xf7\x4a\xcd\xaf\x1d\x46\x0c\x7b\xa9\x7b\x37\xba\xe5\x60\x56\x9a\x17\x07\xed\x32\xda\x0a\x94\x00\xcf\x06\xbb\xfe\xb2\x4f\x35\x9e\xcf\x6c\x69\x46\xfb\x90\x5e\x87\x99\x56\x93\xb4\x99\x81\x71\x9d\xad\x0e\xa1\x9f\x71\x68\xe1\x6e\xc4\x4c\xbf\xd3\x98\x7b\xeb\x5a\x55\xeb\x54\x71\x58\x51\xad\xd2\x7d\xd3\x3b\x4c\x3c\x06\xe9\xb1\x76\xef\x31\x74\xc3\xe9\x1b\xe4\x87\x8f\xf2\xea\x8d\x7d\xd9\xcb\xfc\xe4\xab\x37\x07\xe9\xcb\xc2\xe8\x63\x5f\x26\xf6\xbc\x04\xe6\x80\x36\x44\x0e\xf9\xa2\x7d\x6a\x13\xb3\xee\x11\xdf\xd8\x43\xbe\x24\xb2\x8e\x77\x04\x9d\xc8\xe4\xa8\x1c\xe5\x8b\xa8\xd5\x31\x41\xc5\x28\x5f\xcc\xba\xca\xb4\xa3\x63\xc7\x71\x4b\x79\xcf\xf5\xf2\xff\x20\x0f\xb7\xe7\xfa\x1d\x3e\x9e\xeb\x37\xe0\xe3\x05\x3e\x5a\x7f\xdf\x36\x41\xf8\xa7\xfb\xbc\xdc\xe3\xc6\x5f\x52\x37\xec\xf3\xd8\xbd\xb5\xc3\x53\x9e\x4a\xd2\x9c\x8c\xe0\x55\x49\x89\xa4\x82\x9a\x6b\xf9\x63\x62\xa1\xee\x12\x05\x49\x85\x50\xab\xb2\xc2\x0c\x92\x9a\xd2\x1e\xfb\x9b\x9c\x2c\x51\xc9\x6d\x52\x23\x8c\x4e\xbc\xda\x92\xcb\xa2\x44\x66\x30\x94\xa5\xda\xc9\x21\x23\x3d\xe2\x75\x0c\xac\xcb\x3b\x07\xab\x55\x95\x96\xf2\x3e\xbe\x50\xa5\x68\x51\xc2\x5a\xa4\xd7\xdb\x7a\xfd\xcd\x5d\x76\xbb\x15\x8f\xc8\x22\x27\xad\x67\x87\x7d\xc5\x51\x47\x80\xee\xef\x2f\x5c\x3c\x7a\x74\xb6\xdc\xa2\xaf\x5b\xb1\xb7\xfb\xa3\x0e\x3f\x26\x5d\x57\xde\x6f\x3e\x18\x23\x0e\x0f\xd5\x11\x9f\x51\x46\xec\x54\xf9\xdd\xf2\xa0\xf9\x77\x85\xbd\xc1\xca\x3d\x20\xe9\x21\x6a\x37\x59\xdd\x07\x00\xcf\x8a\x7a\x51\xf3\x56\x24\x1c\xdf\x7c\xbd\xc1\xef\xe7\x68\x3e\xcc\x7e\x1d\x34\xda\x12\x6e\x94\x2f\xfa\x25\x3c\x0c\x3f\xae\xe4\xd2\xcf\xb1\xd0\x34\xb2\x2d\x15\xbd\x2b\xe4\x89\xbb\xb8\x93\xbd\x6e\xff\x3c\x62\xeb\x05\xe3\x8f\x81\x94\x67\xf7\x85\xfc\x44\xdb\xb5\x81\x92\xaa\xf3\x73\xba\x8b\x6a\xde\xce\xf1\xa3\xb8\x3f\xdb\xba\x9a\x6e\xd2\xae\x8b\x42\x11\x9a\x7a\x24\x5e\x19\x3a\xd8\x45\x3a\xfd\xcc\xde\xc5\x3a\x3d\xe6\xd0\x4e\xa3\xa4\x05\xb8\xab\xb2\x5a\x26\x6a\x2a\xf5\xbb\x66\xc2\xd2\xc5\x5c\x26\x8f\xe1\xec\xd4\xfc\x60\x8d\x8d\x44\x8c\xee\x92\xfa\x5d\x85\xb9\x78\xf0\x64\xa3\xe2\x3a\x34\xbb\xd2\x1e\x9a\x9d\x15\x53\x9f\xc8\x54\x5a\xc7\xee\x27\x2c\x6d\x2b\xb0\x65\xbb\xe7\x67\x8b\xff\x0a\x00\x00\xff\xff\x3b\x5f\x0a\xdc\x10\x2a\x00\x00") +var _templateDialectSqlQueryTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\xdd\x6f\xdb\x48\x92\x7f\xa6\xfe\x8a\x1a\xc2\x37\x10\x0d\x99\xb6\x73\x87\x03\x4e\x81\x0f\xf0\xc6\x31\x20\x64\x26\x93\x1d\x67\x66\x1e\x0c\x61\x86\x26\x8b\x72\x43\x54\x53\x21\x5b\x8e\x03\x85\xff\xfb\xa2\xaa\x3f\xd8\x14\x29\xd9\xc9\x7c\xec\x2e\xb0\x0f\x89\xa5\xee\xea\xae\x5f\xd7\x57\x57\x55\x6b\xbb\x3d\x3d\x1e\xbd\x2a\xd7\x9f\x2a\xb1\xb8\x57\xf0\xe2\xec\xfc\xff\x4e\xd6\x15\xd6\x28\x15\x5c\x27\x29\xde\x95\xe5\x12\x66\x32\x8d\xe1\xb2\x28\x80\x89\x6a\xa0\xf9\xea\x01\xb3\x78\xf4\xfe\x5e\xd4\x50\x97\x9b\x2a\x45\x48\xcb\x0c\x41\xd4\x50\x88\x14\x65\x8d\x19\x6c\x64\x86\x15\xa8\x7b\x84\xcb\x75\x92\xde\x23\xbc\x88\xcf\xec\x2c\xe4\xe5\x46\x66\x23\x21\x79\xfe\xbb\xd9\xab\xd7\x6f\x6f\x5e\x43\x2e\x0a\x04\x33\x56\x95\xa5\x82\x4c\x54\x98\xaa\xb2\xfa\x04\x65\x0e\xca\x63\xa6\x2a\xc4\x78\x74\x7c\xda\x34\xa3\x11\x9d\x01\x2e\xb3\x4c\x28\x51\xca\xa4\x80\x5c\x60\x91\xd5\x90\x97\x9a\xf9\xdd\x46\x14\x19\x56\x31\x30\xf5\x76\x0b\x19\xe6\x42\x22\x84\x99\x48\x0a\x4c\xd5\x69\xfd\xa1\x38\xfd\xb0\xc1\xea\xd3\xa9\x5e\x19\x42\xd3\x8c\x82\xed\xf6\x04\x3e\x0a\x75\x0f\x47\xf1\x75\x59\xa1\x58\xc8\x37\xf8\xa9\xe6\xa9\x80\xc6\xaf\xdf\xd4\x70\x57\x96\x85\xa6\x44\x99\x01\xef\xee\x3e\x1e\xe4\x14\x6a\x62\x38\x5a\x2f\x17\x30\xbd\x80\xa3\xf8\x26\x2d\xd7\x18\xbf\x4b\xd2\x65\xb2\x40\x3b\x6b\xa0\x13\xc5\x3a\xa9\xd3\xa4\x70\x84\x7f\x33\x33\x86\xb0\xc2\x14\xc5\x83\xa6\x74\x9f\xdd\x72\x42\x93\x6f\x64\x0a\xe3\x0e\x6d\xd3\xc0\xb1\xcf\xa5\x69\x22\xa8\x3f\x14\x97\x45\x31\x4e\xd5\x23\xa4\xa5\x54\xf8\xa8\xe2\x57\xfa\x6f\x04\xe3\xdb\x39\xd3\xc7\x6f\x93\x15\x41\x9c\x00\x56\x55\x59\x45\xb0\x1d\x05\x0f\x49\x05\xe3\x51\x10\xc8\x32\xc3\x1a\x76\x08\x47\xc1\x41\x69\x3a\x71\x5e\xc0\x0e\xbe\xd8\xcc\x98\x0d\x8c\x64\x83\xe0\xd7\x7a\x8d\xe9\x00\x39\xcb\xf6\x66\x8d\xe9\x38\x1a\x05\xd1\x61\x1d\x76\x26\xdf\xbc\xce\x16\x68\x27\x02\x91\xd3\xce\x55\x22\x17\x08\x47\x62\x02\x47\x48\x72\x8d\xa1\x69\xb6\x5b\x10\x39\x2c\x14\x1c\x09\x38\x23\x01\x7e\xfe\x4c\xa4\x1a\xd8\x10\xf8\xed\xd6\x69\x0e\xad\x38\xe0\x9b\x0b\x90\xa2\x70\xeb\x48\x7e\x41\x47\x0c\xaa\xda\x20\x8f\x39\xa0\xee\xe8\x04\xce\x12\xea\x75\x2c\x8c\xf8\x6d\x99\x61\xfc\xaa\x2c\x36\x2b\x49\x3b\x24\xeb\x35\xca\x6c\xdc\x9f\x9b\xb0\xd0\x3c\x43\xf3\x25\x13\xc7\x71\x34\xd2\x6c\x7d\xa6\x7a\x97\x9b\x34\x91\x3f\x27\xc5\x06\x69\x7f\x32\xa7\x71\x04\xb7\x73\x21\x15\x56\x79\x92\xe2\x56\x9f\x83\x0c\x80\xa4\xf5\xad\x6f\x00\xdb\xb4\x94\xb9\x58\x4c\x7b\x0a\xd3\xe3\x8d\x33\x1c\x07\x9c\xbf\x4e\x80\xfe\x10\xa2\x07\xcd\x77\x7a\xc1\x23\x71\xed\xa0\x90\xa2\x0f\xab\xb9\x27\xaf\x07\x7b\x06\xc3\x4a\x7f\xd7\xbc\xe2\x7c\x69\xf7\xf5\x64\xd1\xd5\x40\x85\x6a\x53\x49\xd0\xcb\x46\x81\x93\xcf\x65\x5d\x8b\x85\xb4\xb2\x31\x5c\xe2\x38\xf6\x24\x14\x69\x8f\x61\x20\x22\x87\x02\xa5\x3e\x68\x04\x17\x17\x70\xa6\xf1\x99\xed\xf3\x95\x8a\x5f\x13\x71\x3e\x0e\x6d\xa0\x68\x9a\x29\x18\x2e\x69\x52\x14\x98\xf1\xc9\xca\x8d\xe2\xaf\x42\x2e\xa0\xd5\x51\x48\xe0\x1b\x4f\x21\xcc\xe8\xb6\x65\x79\x72\x3e\x6f\x0f\xc3\x67\x4f\x78\x6b\x73\x7e\x8d\x5f\x0b\xa1\x19\x11\x5a\xac\x38\xbc\xd4\x1f\x8a\x45\x95\xac\xef\xe3\xbf\x93\xb3\x91\x69\xd5\x14\x2e\x26\x3d\xdd\x66\x15\x7d\x9a\x00\x4b\x27\x7a\xc9\xeb\xb5\xe5\xf3\x41\x2d\x67\x51\x70\x1c\x21\x2e\xa3\x7d\x42\xf1\x50\x92\xa2\x44\xa1\xa9\x49\x2d\xc6\x4b\x51\x47\x51\xcf\x8d\x9d\x51\xe0\xa3\x22\xdd\x1d\x41\xf8\x23\xa6\xa1\x87\x31\x24\xea\x90\xd6\xda\x80\x00\x0a\x57\xeb\x22\x51\x83\x97\x03\x26\x0b\xac\x8a\x32\xc9\x84\x5c\x84\x1c\x0d\x76\x2c\xc3\xff\xdc\x47\xfc\x45\x31\xf8\x55\xb9\x91\x6a\x4f\x14\x16\x52\xf9\x91\x57\xc7\xc2\xe9\x13\xc1\xd0\xe0\x71\xca\x63\x06\xcf\x56\xde\x97\x81\x7f\xfd\x28\xea\x7d\xe0\xe9\xc6\xf4\xd1\xcb\x89\xb5\xab\x5d\x04\xbe\x14\x22\x67\x80\x7d\x03\xca\x93\xa2\xc6\xc9\x5e\x7f\x49\xef\x31\x5d\x02\x12\x24\x94\x29\x4e\xe1\xbf\x1e\x42\xe6\xa9\xed\xda\xea\x09\xfe\x1f\xce\xbe\x54\x4f\x9e\x80\xe1\xb8\xeb\x16\x34\xda\x51\xce\xb7\xfd\x79\x3a\x03\x69\x60\xea\x4d\xd2\x77\x3b\x17\xbc\x4f\xee\x0a\x9c\xf6\xe2\x35\x0f\x4f\x88\xc0\x84\xf4\x3e\x89\x8d\xf5\x44\x34\xbb\xf2\x19\x5c\x53\x86\xe3\x38\x04\xef\x3f\xad\x71\xaa\x13\xa6\x98\x37\x99\x5d\xc5\x34\x46\x1a\xab\x95\xbd\xe7\x99\x54\xef\xd9\xe7\x65\x97\xf1\x8a\x44\x2a\xbb\x80\xff\xe7\xff\xae\xab\x72\xd5\x0f\xfd\xf5\x87\x82\x26\x7f\x92\xe2\xc3\x06\xa7\x7c\xe5\x4d\x6c\xa8\x59\xd7\x43\x16\xb1\xae\x30\x13\x69\xa2\xb0\x7e\xc9\x51\x62\x5d\x47\xa4\x36\x36\x06\x1d\x82\xdf\x59\x0a\x1b\x85\x6b\x2c\x38\x7f\x64\xfd\xc4\x37\xe6\x5b\xa4\x23\x2d\x25\x88\x82\x33\x26\x8e\x21\x6b\x7b\x41\xac\xeb\x5b\x31\x77\x4b\xdd\x25\xd0\x58\x74\x85\x58\x09\x35\x04\x90\x27\x5e\x9a\x79\xcf\x52\x35\xb8\xef\x78\xf8\x02\x8e\x79\xde\x6e\x56\xe6\x79\x8d\x83\xbb\xe9\x99\x97\x96\xa2\xb7\xdf\x0f\x7a\xfc\x02\x8e\x35\xc5\x61\xe1\x95\x55\x86\xd5\x3e\xb9\xfd\x40\x93\x7f\x9e\xcc\x8c\x93\x31\xaf\x2f\x0b\x25\xec\x2c\xc6\xbd\x1c\x14\x62\xe9\x65\xc6\x34\x75\xa5\xa3\xf5\xee\x9e\x26\x8c\xb9\xe9\x28\x1a\x05\xea\x9c\x16\xd9\xa2\x80\x9d\x69\x3c\xe8\x62\xd1\x28\x70\xa2\xf0\x56\x68\x14\x63\x75\x6e\xbd\xac\xb7\xda\x8c\xd3\xdd\xc9\xff\xc8\xfe\xc7\xea\x5c\x07\xb1\x01\x37\xf0\x55\xeb\x38\x0e\x06\x44\x8f\xc0\xe2\x70\xdf\x9f\x89\x86\x15\x42\x5a\xfc\x75\x02\xeb\x56\x91\xfb\x7d\x8d\x61\xad\x7d\xd5\x3e\x6b\x03\xb6\xb7\xc1\xb5\x5f\x69\xf4\xa7\xa7\xc6\xb1\x44\x0d\xab\x44\x66\x09\x97\x85\x04\xc4\xd0\xa6\x45\xb2\xa9\x31\x86\x5f\x10\x6a\x95\x54\x4a\xaf\xe1\x14\x20\xc3\x3c\xd9\x14\x4a\xe7\x6c\x13\x48\x64\x06\xe5\x03\x56\x95\xa0\x8a\x55\xc1\x1d\x16\xe5\x47\x4a\xec\x25\x62\x46\x65\xad\x27\x66\xed\x65\x63\xe3\x63\x91\xf6\xe2\xf1\x2a\x51\xf7\xf1\xf7\xc9\xe3\x4c\xaa\xff\x7e\x11\x7d\x75\x60\x70\x5c\xf4\xae\x3a\x32\x74\x2e\x26\x4b\x31\xe2\x3a\xaf\x2d\x2d\x4f\x8f\xf5\xf5\x73\xba\x4e\xf4\xf9\x84\xc4\x9a\xcb\x5d\x1e\x86\x05\x4a\xac\x12\x2a\x88\x59\x44\x4c\x55\xe6\x90\xc0\x42\x3c\xa0\x04\xcc\x16\xf8\x9c\x82\x98\xd6\xb5\xe5\xf0\x91\xe4\x2c\x8b\x4b\x16\x42\x40\xec\x38\xbd\xfc\x68\x44\xee\x01\xc8\xab\x72\x65\x38\xe8\xb5\xe8\xd7\xb9\x94\x79\x75\xb6\x21\x40\xb4\x0d\x69\x00\x54\xc9\xf8\x17\x15\x45\x72\x9a\x65\xf8\xaa\xec\xec\xe7\x97\xbc\x76\xdb\x1f\x5b\x99\x8f\x82\x5a\xe1\xba\x93\xb0\xbe\xc5\x8f\x37\x0a\xd7\x54\xa6\xb6\xf7\x21\xf9\x26\xa9\x4b\xf6\xaf\x58\xe8\x8d\xeb\x81\x9d\xcb\x6e\xc8\x51\x4d\xdc\x8a\x26\x3e\xaf\xf7\x25\x73\x42\x7d\xc3\x0e\xb3\xeb\x4f\x7a\xa3\x5d\xc6\xdd\xcd\x49\xa2\x63\xf7\x4d\x2f\xfa\x11\x0b\x5e\xe8\x50\x62\x3c\xab\x67\xf2\x01\xab\xba\x1d\xeb\x1d\x10\x35\x9e\xdd\xfb\x9c\x84\x2e\x72\x9a\xfe\xfe\xc5\xf7\x70\x62\x4a\xe5\x3d\x3b\xbc\x7b\xe3\x2d\x8f\xe3\xd8\x95\xb1\x45\x8d\x4f\xad\xd5\x01\xcb\x5b\xef\xd7\xc0\x7a\x2d\x1d\x3d\x1a\x05\x6c\x69\x1c\x41\x3d\x2d\xdf\xa0\x7a\x8b\x62\x71\x7f\x57\x56\xf5\x93\xf7\xc1\x04\xc8\x4a\xa2\x3d\xbe\x45\x36\xfc\xb4\x6f\x25\xda\x9d\x3c\xbb\x77\x6e\xc6\x65\xd5\x73\xfa\x4e\x55\xb9\xfa\x77\x74\x33\xd6\x86\xc8\x86\x42\x9e\x35\x17\x76\x97\x59\x7d\xa3\x2a\xaa\x4f\x9b\x46\x64\xe3\x88\xa4\x5d\xb0\x09\xce\xae\x5a\xc9\xff\x75\x0e\x2b\xb2\xff\x38\xe6\x5f\xef\x98\xbf\xd3\x2b\x0f\xb8\x4f\xb7\x32\x3f\xe8\x0a\x87\xad\x9a\x09\x44\x6e\x7c\x6b\xc0\xaa\xf7\xb5\xf4\x5e\x9a\x25\xde\xdd\xde\x55\x8b\x16\x56\xbe\xe4\xdc\x7c\x95\x2c\x71\x7c\x3b\x37\xc7\xfe\x59\x27\x25\x67\x13\xaf\xf5\xc1\x09\xb4\xc8\x5a\xea\x55\xb2\xbe\xf5\x0b\x34\x68\x9a\xdd\x66\xec\xce\x6a\x93\xa2\xd9\xf6\x8f\xce\xd2\x74\x97\x4d\xa7\xec\x22\xab\x6f\x39\x40\xcd\xae\xe6\xa0\xfb\x43\x3c\x4e\x20\x5d\x73\x2c\x5f\xda\xce\xd8\xec\xca\x65\xf5\xae\xdb\x1b\x04\x14\x50\x08\xe7\xed\xbc\xeb\x0e\x06\xa3\xa3\xa1\x2d\x3b\x07\xe9\x91\xce\x77\x9a\xc6\xcc\x8d\xff\x1b\x28\xa2\x49\x9b\x9d\x42\x3a\x08\x68\x68\xba\x43\xd2\xce\x06\xc6\xbb\xa6\x43\xee\xa6\x29\xf6\x94\xdb\x07\x3c\xef\x40\x05\x3e\xe0\x6d\x7a\x89\xf9\xe3\x2a\xd5\xa9\x29\xba\x06\xab\xad\x20\xa8\xe3\x5f\xee\xb1\xe2\x00\x12\xcf\x6c\x6f\xee\x19\xcc\x6e\x75\xa7\x7a\xe7\xa4\xe7\x6d\xe4\x3d\x73\xce\x35\x9f\x40\xbe\xe4\xfa\x20\xf2\x11\xd2\xa6\xe5\x86\xd3\xd9\x90\xb8\xbf\xdd\x14\xc5\x4c\xaa\xff\xfd\x9f\xd0\xf5\xc1\xd9\x1a\x7f\xaa\xb1\xba\x62\xd7\xb4\x3d\x70\x5a\x75\xa1\x27\x69\x91\xd1\xaf\x17\xe8\xcd\xee\x42\x1e\xdc\xbc\xb5\x90\x3e\x0b\x21\x89\x43\x4b\xb1\x97\x4f\xdb\x10\x9d\xba\x9e\xf5\x0b\xbf\x69\x6d\xe4\x6c\xd2\xed\x9d\xb9\x6f\xed\x71\x9a\x66\xdb\x4c\x74\x4f\x5b\x48\xfe\xd6\xf8\xb2\xd2\x4d\x59\xc3\xa1\xdc\xa8\x09\x08\x09\x7b\xfa\xbe\xe4\x10\x4c\x52\x2e\xe9\xf8\xe5\x46\xc5\xe3\xe3\x96\x8f\xd6\x01\x05\xa1\x6f\xca\x25\x7c\xfe\x0c\xc8\xe2\x6c\xe3\x4a\x30\xdc\x23\xde\x48\x7c\x5c\x63\xaa\x30\x03\x91\xe9\x42\x87\xb3\x13\x72\xbe\x93\x72\xa3\x42\xb3\x71\x63\x20\x08\x69\x11\x08\x69\x00\xf0\xc9\xfa\xfc\x49\xd6\xbf\x8f\xbd\x90\x3b\xdc\xcb\x8d\x62\xa5\x98\x10\xbb\xd3\xa6\xbd\xac\x16\x21\x84\x74\xee\x10\x42\x6e\x58\x85\x6c\x4d\x10\x5a\x35\x87\x4e\x2b\xcf\x6f\xd9\x9e\xae\x5e\xac\x74\x87\x3b\xb4\x4f\x39\x9e\x9d\x04\x42\x3e\x8d\x48\x48\x0f\x90\x33\xbe\x0e\x2c\x6d\x1d\x7f\x18\x2a\x8a\xbc\x4e\x4f\x59\x7d\x6b\x05\x37\xef\x68\xe9\x79\x7a\xe1\x9b\x40\x64\x64\x9a\x1c\x91\x4d\x2b\xd4\x6e\xb9\x63\x1f\x26\xae\xbb\x8b\xc0\x0c\x90\x65\xfb\xe4\xbc\xd3\xad\x19\x9b\x77\xc9\xdb\xf1\xf6\x21\x27\xf0\x1b\xff\x9e\x0b\xd9\xa7\x9a\xc1\x47\x06\xee\xea\x7f\xd5\x23\x43\xf7\x99\xc1\x13\xcc\x6f\xfa\xbe\xd6\x57\x53\xa8\x03\xa8\xb9\x78\x42\x12\xcc\x6f\xb6\x47\x6c\xa0\xe9\x8c\x46\xc7\xe2\xe1\x74\x70\x76\x35\x93\x56\x4a\x2e\x98\x4a\x9b\xf3\xb8\x36\xb7\xde\xc8\xbc\xb1\x46\xde\xa9\xf7\xa2\xe6\xc7\x11\x03\xc3\x5e\xea\xde\x8d\x6e\x39\x98\x95\xe6\xc5\x41\x9b\x8c\xd6\x02\x25\xc0\xf3\x51\xdf\x5e\xf6\x89\xc6\xb3\x99\x1d\xc9\x68\x1b\xd2\xeb\x30\xd3\x62\x92\x36\x33\x30\xa6\xb3\xd3\x21\xf4\x33\x0e\x0d\xee\x56\xcc\xf5\x3b\x8d\xb9\xb7\x6e\x54\xb5\x49\x15\xbb\x15\xd5\x2a\xdd\x27\xc0\xc3\xc4\x13\x90\x1e\x6b\xf7\x1e\x43\x37\x9c\xbe\x41\x7e\xf8\x28\xaf\xdf\xd8\x87\xc0\xcc\x4f\xbe\x06\x73\x90\xa1\x2c\x8c\x3e\x0e\x65\x62\xcf\x4b\x60\x0e\x48\x43\xe4\x90\x2f\xdb\x97\x39\x31\xef\x1e\xf1\x8d\x3d\xe4\x4b\x22\xeb\x58\x47\xd0\xf1\x4c\xf6\xca\xe3\x7c\x19\xb5\x32\xa6\x50\x71\x9c\x2f\xe7\x5d\x61\xda\xd1\x89\xe3\xb8\x23\xbc\xe7\x5a\xf9\xbf\x90\x85\xdb\x73\xfd\x0e\x1b\xcf\xf5\x93\xf1\xc9\x12\x3f\x59\x7b\xdf\x55\x41\xf8\xa7\xdb\xbc\xdc\x63\xc6\x5f\x53\x37\xec\xb3\xd8\xbd\xb5\xc3\x53\x96\x4a\x68\x4e\x8f\xe1\x55\x49\x89\xa4\x82\x9a\x6b\xf9\x13\x62\xa1\xee\x13\x05\x49\x85\x50\xab\xb2\xc2\x0c\x92\x9a\xd2\x1e\xfb\x13\x9e\x2c\x51\xc9\x5d\x52\x23\x1c\x9f\x7a\xb5\x25\x97\x45\x89\xcc\x60\x2c\x4b\xd5\xcb\x21\x23\x3d\xe2\x75\x0c\xac\xc9\x3b\x03\xab\x55\x95\x96\xf2\x21\xbe\x54\xa5\x68\xa3\x84\xd5\xc8\xa0\xb5\x0d\xda\x9b\xbb\xec\xfa\x15\x8f\xc8\x22\x87\xd6\xd3\xc3\xbe\xe2\xa8\x03\xa0\xfb\x73\x0d\xe7\x8f\x1e\x9d\x2d\xb7\xe8\xeb\x8e\xef\xf5\x7f\x03\xe2\xfb\xa4\xeb\xca\xfb\xcd\x07\xa3\xc4\xf1\xa1\x3a\xe2\x0b\xca\x88\x5e\x95\xdf\x2d\x0f\x9a\x7f\x96\xdb\x9b\x58\xb9\x27\x48\x7a\x11\xb5\x9b\xac\xee\x0b\x00\xcf\xf2\x7a\x51\xf3\x56\x04\x8e\x6f\xbe\x41\xe7\xf7\x73\x34\x3f\xcc\xfe\x35\xd1\x68\x07\xdc\x71\xbe\x1c\x46\x78\x38\xfc\xb8\x92\x4b\x3f\xc7\x42\xd3\xc8\xb6\x54\xf4\xae\x90\x27\xee\xe2\x4e\xf6\xba\xfb\xf3\x88\x9d\x17\x8c\x3f\x26\xa4\x3c\xbb\x2f\xe4\x27\xda\xae\x0d\x94\x54\x9d\x5f\xdf\x5d\x56\x8b\x76\x8e\x1f\xc5\xfd\xd9\xd6\xd4\x74\x93\x76\x53\x14\x8a\xa2\xa9\x47\xe2\x95\xa1\xa3\x7e\xa4\xd3\xcf\xec\xdd\x58\xa7\xc7\x5c\xb4\xd3\x51\xd2\x06\xb8\xeb\xb2\x5a\x25\x6a\x26\xf5\xbb\x66\xc2\xe8\x62\x2e\x93\x27\x70\x7e\x66\x7e\xdf\xc6\x4a\x22\x46\xf7\x49\xfd\xae\xc2\x5c\x3c\x7a\xd8\xa8\xb8\x0e\xcd\xae\xb4\x87\x66\x67\x61\xea\x13\x99\x4a\xeb\xc4\xfd\x84\xa5\x6d\x05\xb6\x6c\xf7\xfd\xca\xf1\x1f\x01\x00\x00\xff\xff\x76\x30\xde\x86\x40\x2a\x00\x00") func templateDialectSqlQueryTmplBytes() ([]byte, error) { return bindataRead( @@ -776,7 +776,7 @@ func templateDialectSqlQueryTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/sql/query.tmpl", size: 10768, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/dialect/sql/query.tmpl", size: 10816, 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/sql/query.tmpl b/entc/gen/template/dialect/sql/query.tmpl index a09d0daf6..58124e94f 100644 --- a/entc/gen/template/dialect/sql/query.tmpl +++ b/entc/gen/template/dialect/sql/query.tmpl @@ -55,6 +55,9 @@ func ({{ $receiver }} *{{ $builder }}) sqlAll(ctx context.Context) ([]*{{ $.Name if err := sqlgraph.QueryNodes(ctx, {{ $receiver }}.driver, _spec); err != nil { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } {{- range $e := $.Edges }} {{- with extend $ "Rec" $receiver "Edge" $e }} {{ template "dialect/sql/query/eagerloading" . }} @@ -317,4 +320,4 @@ func ({{ $receiver }} *{{ $builder }}) sqlQuery() *sql.Selector { {{- else -}} {{ $arg }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/entc/integration/config/ent/user_query.go b/entc/integration/config/ent/user_query.go index 281f09b15..f896215c8 100644 --- a/entc/integration/config/ent/user_query.go +++ b/entc/integration/config/ent/user_query.go @@ -262,6 +262,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { if err := sqlgraph.QueryNodes(ctx, uq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/entc/integration/customid/ent/blob_query.go b/entc/integration/customid/ent/blob_query.go index e1bd0ce26..79c048f97 100644 --- a/entc/integration/customid/ent/blob_query.go +++ b/entc/integration/customid/ent/blob_query.go @@ -287,6 +287,10 @@ func (bq *BlobQuery) sqlAll(ctx context.Context) ([]*Blob, error) { if err := sqlgraph.QueryNodes(ctx, bq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/entc/integration/customid/ent/group_query.go b/entc/integration/customid/ent/group_query.go index 61c7d8c5a..d3ffcd764 100644 --- a/entc/integration/customid/ent/group_query.go +++ b/entc/integration/customid/ent/group_query.go @@ -290,6 +290,10 @@ func (gq *GroupQuery) sqlAll(ctx context.Context) ([]*Group, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := gq.withUsers; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[int]*Group, len(nodes)) diff --git a/entc/integration/customid/ent/user_query.go b/entc/integration/customid/ent/user_query.go index 7e50217b2..846adf16c 100644 --- a/entc/integration/customid/ent/user_query.go +++ b/entc/integration/customid/ent/user_query.go @@ -349,6 +349,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withGroups; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[int]*User, len(nodes)) diff --git a/entc/integration/ent/card_query.go b/entc/integration/ent/card_query.go index e89e8793e..70b6f04f9 100644 --- a/entc/integration/ent/card_query.go +++ b/entc/integration/ent/card_query.go @@ -351,6 +351,10 @@ func (cq *CardQuery) sqlAll(ctx context.Context) ([]*Card, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := cq.withOwner; query != nil { ids := make([]string, 0, len(nodes)) nodeids := make(map[string][]*Card) diff --git a/entc/integration/ent/comment_query.go b/entc/integration/ent/comment_query.go index ae003ca37..b80795510 100644 --- a/entc/integration/ent/comment_query.go +++ b/entc/integration/ent/comment_query.go @@ -286,6 +286,10 @@ func (cq *CommentQuery) sqlAll(ctx context.Context) ([]*Comment, error) { if err := sqlgraph.QueryNodes(ctx, cq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/entc/integration/ent/fieldtype_query.go b/entc/integration/ent/fieldtype_query.go index 9c1c3d827..51b3bcca8 100644 --- a/entc/integration/ent/fieldtype_query.go +++ b/entc/integration/ent/fieldtype_query.go @@ -286,6 +286,10 @@ func (ftq *FieldTypeQuery) sqlAll(ctx context.Context) ([]*FieldType, error) { if err := sqlgraph.QueryNodes(ctx, ftq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/entc/integration/ent/file_query.go b/entc/integration/ent/file_query.go index 8294af863..2d76e2560 100644 --- a/entc/integration/ent/file_query.go +++ b/entc/integration/ent/file_query.go @@ -349,6 +349,10 @@ func (fq *FileQuery) sqlAll(ctx context.Context) ([]*File, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := fq.withOwner; query != nil { ids := make([]string, 0, len(nodes)) nodeids := make(map[string][]*File) diff --git a/entc/integration/ent/filetype_query.go b/entc/integration/ent/filetype_query.go index 444005a97..bccfff024 100644 --- a/entc/integration/ent/filetype_query.go +++ b/entc/integration/ent/filetype_query.go @@ -315,6 +315,10 @@ func (ftq *FileTypeQuery) sqlAll(ctx context.Context) ([]*FileType, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := ftq.withFiles; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[string]*FileType) diff --git a/entc/integration/ent/group_query.go b/entc/integration/ent/group_query.go index a367b2879..5b4436e5c 100644 --- a/entc/integration/ent/group_query.go +++ b/entc/integration/ent/group_query.go @@ -400,6 +400,10 @@ func (gq *GroupQuery) sqlAll(ctx context.Context) ([]*Group, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := gq.withFiles; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[string]*Group) diff --git a/entc/integration/ent/groupinfo_query.go b/entc/integration/ent/groupinfo_query.go index ceeb0af11..7bf295b60 100644 --- a/entc/integration/ent/groupinfo_query.go +++ b/entc/integration/ent/groupinfo_query.go @@ -315,6 +315,10 @@ func (giq *GroupInfoQuery) sqlAll(ctx context.Context) ([]*GroupInfo, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := giq.withGroups; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[string]*GroupInfo) diff --git a/entc/integration/ent/item_query.go b/entc/integration/ent/item_query.go index 629d76698..41ee5414b 100644 --- a/entc/integration/ent/item_query.go +++ b/entc/integration/ent/item_query.go @@ -262,6 +262,10 @@ func (iq *ItemQuery) sqlAll(ctx context.Context) ([]*Item, error) { if err := sqlgraph.QueryNodes(ctx, iq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/entc/integration/ent/node_query.go b/entc/integration/ent/node_query.go index d86f7ffcf..7510ce463 100644 --- a/entc/integration/ent/node_query.go +++ b/entc/integration/ent/node_query.go @@ -349,6 +349,10 @@ func (nq *NodeQuery) sqlAll(ctx context.Context) ([]*Node, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := nq.withPrev; query != nil { ids := make([]string, 0, len(nodes)) nodeids := make(map[string][]*Node) diff --git a/entc/integration/ent/pet_query.go b/entc/integration/ent/pet_query.go index c98c9838a..df6501b83 100644 --- a/entc/integration/ent/pet_query.go +++ b/entc/integration/ent/pet_query.go @@ -348,6 +348,10 @@ func (pq *PetQuery) sqlAll(ctx context.Context) ([]*Pet, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := pq.withTeam; query != nil { ids := make([]string, 0, len(nodes)) nodeids := make(map[string][]*Pet) diff --git a/entc/integration/ent/spec_query.go b/entc/integration/ent/spec_query.go index c53f4fe28..7d780ad76 100644 --- a/entc/integration/ent/spec_query.go +++ b/entc/integration/ent/spec_query.go @@ -291,6 +291,10 @@ func (sq *SpecQuery) sqlAll(ctx context.Context) ([]*Spec, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := sq.withCard; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[string]*Spec, len(nodes)) diff --git a/entc/integration/ent/user_query.go b/entc/integration/ent/user_query.go index e8b280d36..7b249619c 100644 --- a/entc/integration/ent/user_query.go +++ b/entc/integration/ent/user_query.go @@ -569,6 +569,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withCard; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[string]*User) diff --git a/entc/integration/idtype/ent/user_query.go b/entc/integration/idtype/ent/user_query.go index 544e26b78..ddf1285da 100644 --- a/entc/integration/idtype/ent/user_query.go +++ b/entc/integration/idtype/ent/user_query.go @@ -372,6 +372,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withSpouse; query != nil { ids := make([]uint64, 0, len(nodes)) nodeids := make(map[uint64][]*User) diff --git a/entc/integration/json/ent/user_query.go b/entc/integration/json/ent/user_query.go index ce5b7fbd8..c221f933b 100644 --- a/entc/integration/json/ent/user_query.go +++ b/entc/integration/json/ent/user_query.go @@ -286,6 +286,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { if err := sqlgraph.QueryNodes(ctx, uq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/entc/integration/migrate/entv1/car_query.go b/entc/integration/migrate/entv1/car_query.go index 268cf460f..c50b49089 100644 --- a/entc/integration/migrate/entv1/car_query.go +++ b/entc/integration/migrate/entv1/car_query.go @@ -300,6 +300,10 @@ func (cq *CarQuery) sqlAll(ctx context.Context) ([]*Car, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := cq.withOwner; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*Car) diff --git a/entc/integration/migrate/entv1/user_query.go b/entc/integration/migrate/entv1/user_query.go index 5ea556909..67aecc392 100644 --- a/entc/integration/migrate/entv1/user_query.go +++ b/entc/integration/migrate/entv1/user_query.go @@ -397,6 +397,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withParent; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*User) diff --git a/entc/integration/migrate/entv2/car_query.go b/entc/integration/migrate/entv2/car_query.go index e7cc0bb95..b343d235c 100644 --- a/entc/integration/migrate/entv2/car_query.go +++ b/entc/integration/migrate/entv2/car_query.go @@ -300,6 +300,10 @@ func (cq *CarQuery) sqlAll(ctx context.Context) ([]*Car, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := cq.withOwner; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*Car) diff --git a/entc/integration/migrate/entv2/group_query.go b/entc/integration/migrate/entv2/group_query.go index 89dc6398e..e009e158e 100644 --- a/entc/integration/migrate/entv2/group_query.go +++ b/entc/integration/migrate/entv2/group_query.go @@ -262,6 +262,10 @@ func (gq *GroupQuery) sqlAll(ctx context.Context) ([]*Group, error) { if err := sqlgraph.QueryNodes(ctx, gq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/entc/integration/migrate/entv2/pet_query.go b/entc/integration/migrate/entv2/pet_query.go index 29a515b81..6cae2a5d7 100644 --- a/entc/integration/migrate/entv2/pet_query.go +++ b/entc/integration/migrate/entv2/pet_query.go @@ -262,6 +262,10 @@ func (pq *PetQuery) sqlAll(ctx context.Context) ([]*Pet, error) { if err := sqlgraph.QueryNodes(ctx, pq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/entc/integration/migrate/entv2/user_query.go b/entc/integration/migrate/entv2/user_query.go index c163d6764..35563294f 100644 --- a/entc/integration/migrate/entv2/user_query.go +++ b/entc/integration/migrate/entv2/user_query.go @@ -314,6 +314,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withCar; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[int]*User) diff --git a/entc/integration/template/ent/group_query.go b/entc/integration/template/ent/group_query.go index 5b9c965b5..72ea5741d 100644 --- a/entc/integration/template/ent/group_query.go +++ b/entc/integration/template/ent/group_query.go @@ -286,6 +286,10 @@ func (gq *GroupQuery) sqlAll(ctx context.Context) ([]*Group, error) { if err := sqlgraph.QueryNodes(ctx, gq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/entc/integration/template/ent/pet_query.go b/entc/integration/template/ent/pet_query.go index aedcc67f4..d552dbd07 100644 --- a/entc/integration/template/ent/pet_query.go +++ b/entc/integration/template/ent/pet_query.go @@ -324,6 +324,10 @@ func (pq *PetQuery) sqlAll(ctx context.Context) ([]*Pet, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := pq.withOwner; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*Pet) diff --git a/entc/integration/template/ent/user_query.go b/entc/integration/template/ent/user_query.go index 6f247dc77..02543bef9 100644 --- a/entc/integration/template/ent/user_query.go +++ b/entc/integration/template/ent/user_query.go @@ -338,6 +338,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withPets; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[int]*User) diff --git a/examples/edgeindex/ent/city_query.go b/examples/edgeindex/ent/city_query.go index 9b3f09f75..c9543ebeb 100644 --- a/examples/edgeindex/ent/city_query.go +++ b/examples/edgeindex/ent/city_query.go @@ -314,6 +314,10 @@ func (cq *CityQuery) sqlAll(ctx context.Context) ([]*City, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := cq.withStreets; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[int]*City) diff --git a/examples/edgeindex/ent/street_query.go b/examples/edgeindex/ent/street_query.go index 13708b43f..a1d880b78 100644 --- a/examples/edgeindex/ent/street_query.go +++ b/examples/edgeindex/ent/street_query.go @@ -324,6 +324,10 @@ func (sq *StreetQuery) sqlAll(ctx context.Context) ([]*Street, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := sq.withCity; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*Street) diff --git a/examples/entcpkg/ent/user_query.go b/examples/entcpkg/ent/user_query.go index 7f6a5d7d4..85e8cb8a4 100644 --- a/examples/entcpkg/ent/user_query.go +++ b/examples/entcpkg/ent/user_query.go @@ -262,6 +262,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { if err := sqlgraph.QueryNodes(ctx, uq.driver, _spec); err != nil { return nil, err } + + if len(nodes) == 0 { + return nodes, nil + } return nodes, nil } diff --git a/examples/m2m2types/ent/group_query.go b/examples/m2m2types/ent/group_query.go index 274710894..783be737e 100644 --- a/examples/m2m2types/ent/group_query.go +++ b/examples/m2m2types/ent/group_query.go @@ -314,6 +314,10 @@ func (gq *GroupQuery) sqlAll(ctx context.Context) ([]*Group, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := gq.withUsers; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[int]*Group, len(nodes)) diff --git a/examples/m2m2types/ent/user_query.go b/examples/m2m2types/ent/user_query.go index e48acc1a7..be6dcbfe6 100644 --- a/examples/m2m2types/ent/user_query.go +++ b/examples/m2m2types/ent/user_query.go @@ -314,6 +314,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withGroups; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[int]*User, len(nodes)) diff --git a/examples/m2mbidi/ent/user_query.go b/examples/m2mbidi/ent/user_query.go index d0a142ef1..f64c70849 100644 --- a/examples/m2mbidi/ent/user_query.go +++ b/examples/m2mbidi/ent/user_query.go @@ -313,6 +313,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withFriends; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[int]*User, len(nodes)) diff --git a/examples/m2mrecur/ent/user_query.go b/examples/m2mrecur/ent/user_query.go index 3d6635946..6d1f2cf6f 100644 --- a/examples/m2mrecur/ent/user_query.go +++ b/examples/m2mrecur/ent/user_query.go @@ -337,6 +337,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withFollowers; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[int]*User, len(nodes)) diff --git a/examples/o2m2types/ent/pet_query.go b/examples/o2m2types/ent/pet_query.go index 0751afb45..781dfc4a6 100644 --- a/examples/o2m2types/ent/pet_query.go +++ b/examples/o2m2types/ent/pet_query.go @@ -324,6 +324,10 @@ func (pq *PetQuery) sqlAll(ctx context.Context) ([]*Pet, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := pq.withOwner; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*Pet) diff --git a/examples/o2m2types/ent/user_query.go b/examples/o2m2types/ent/user_query.go index c0154a39b..6a7efb29a 100644 --- a/examples/o2m2types/ent/user_query.go +++ b/examples/o2m2types/ent/user_query.go @@ -314,6 +314,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withPets; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[int]*User) diff --git a/examples/o2mrecur/ent/node_query.go b/examples/o2mrecur/ent/node_query.go index 7ed6b0649..a6e9ada16 100644 --- a/examples/o2mrecur/ent/node_query.go +++ b/examples/o2mrecur/ent/node_query.go @@ -348,6 +348,10 @@ func (nq *NodeQuery) sqlAll(ctx context.Context) ([]*Node, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := nq.withParent; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*Node) diff --git a/examples/o2o2types/ent/card_query.go b/examples/o2o2types/ent/card_query.go index f834d7d02..8c93b0ad6 100644 --- a/examples/o2o2types/ent/card_query.go +++ b/examples/o2o2types/ent/card_query.go @@ -324,6 +324,10 @@ func (cq *CardQuery) sqlAll(ctx context.Context) ([]*Card, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := cq.withOwner; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*Card) diff --git a/examples/o2o2types/ent/user_query.go b/examples/o2o2types/ent/user_query.go index ebd81b106..52ff55cd5 100644 --- a/examples/o2o2types/ent/user_query.go +++ b/examples/o2o2types/ent/user_query.go @@ -314,6 +314,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withCard; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[int]*User) diff --git a/examples/o2obidi/ent/user_query.go b/examples/o2obidi/ent/user_query.go index 62192c57a..4a4fadb78 100644 --- a/examples/o2obidi/ent/user_query.go +++ b/examples/o2obidi/ent/user_query.go @@ -323,6 +323,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withSpouse; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*User) diff --git a/examples/o2orecur/ent/node_query.go b/examples/o2orecur/ent/node_query.go index 57a5f1099..dadd28959 100644 --- a/examples/o2orecur/ent/node_query.go +++ b/examples/o2orecur/ent/node_query.go @@ -348,6 +348,10 @@ func (nq *NodeQuery) sqlAll(ctx context.Context) ([]*Node, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := nq.withPrev; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*Node) diff --git a/examples/start/ent/car_query.go b/examples/start/ent/car_query.go index e78d007a2..6dac178fd 100644 --- a/examples/start/ent/car_query.go +++ b/examples/start/ent/car_query.go @@ -324,6 +324,10 @@ func (cq *CarQuery) sqlAll(ctx context.Context) ([]*Car, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := cq.withOwner; query != nil { ids := make([]int, 0, len(nodes)) nodeids := make(map[int][]*Car) diff --git a/examples/start/ent/group_query.go b/examples/start/ent/group_query.go index 283609a87..8376090fc 100644 --- a/examples/start/ent/group_query.go +++ b/examples/start/ent/group_query.go @@ -314,6 +314,10 @@ func (gq *GroupQuery) sqlAll(ctx context.Context) ([]*Group, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := gq.withUsers; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[int]*Group, len(nodes)) diff --git a/examples/start/ent/user_query.go b/examples/start/ent/user_query.go index d61b17c97..c20cf0f68 100644 --- a/examples/start/ent/user_query.go +++ b/examples/start/ent/user_query.go @@ -339,6 +339,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withCars; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[int]*User) diff --git a/examples/traversal/ent/group_query.go b/examples/traversal/ent/group_query.go index 5030af06f..3b6feb4de 100644 --- a/examples/traversal/ent/group_query.go +++ b/examples/traversal/ent/group_query.go @@ -349,6 +349,10 @@ func (gq *GroupQuery) sqlAll(ctx context.Context) ([]*Group, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := gq.withUsers; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[int]*Group, len(nodes)) diff --git a/examples/traversal/ent/pet_query.go b/examples/traversal/ent/pet_query.go index a013ea67f..7e1c4cf64 100644 --- a/examples/traversal/ent/pet_query.go +++ b/examples/traversal/ent/pet_query.go @@ -349,6 +349,10 @@ func (pq *PetQuery) sqlAll(ctx context.Context) ([]*Pet, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := pq.withFriends; query != nil { fks := make([]driver.Value, 0, len(nodes)) ids := make(map[int]*Pet, len(nodes)) diff --git a/examples/traversal/ent/user_query.go b/examples/traversal/ent/user_query.go index e7ad6cad5..da59a56a3 100644 --- a/examples/traversal/ent/user_query.go +++ b/examples/traversal/ent/user_query.go @@ -387,6 +387,10 @@ func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) { return nil, err } + if len(nodes) == 0 { + return nodes, nil + } + if query := uq.withPets; query != nil { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[int]*User)