diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index 149ca3457..fd508145e 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -230,7 +230,7 @@ func templateBuilderMutationTmpl() (*asset, error) { return a, nil } -var _templateBuilderQueryTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xdc\x5a\xed\x6f\xdb\x38\x93\xff\x6c\xff\x15\xb3\x42\x36\xb0\x03\x47\x6e\xfb\xed\x72\xc8\x01\xdd\xa6\x3d\x18\x28\xba\x2f\xed\x61\x17\x28\x8a\x2e\x23\x8d\x6c\x6e\x65\x4a\x4b\x52\x4e\x82\x9c\xff\xf7\x07\x1c\x52\x12\xf5\x16\xcb\x69\x76\x9f\xee\xf3\xc9\x96\x44\x0e\x87\x33\xbf\x79\x21\x67\xee\xef\x97\x67\xd3\x57\x59\x7e\x27\xf9\x7a\xa3\xe1\xc5\xb3\xe7\xff\x75\x9e\x4b\x54\x28\x34\xbc\x61\x11\x5e\x67\xd9\x17\x58\x89\x28\x84\x97\x69\x0a\x34\x48\x81\xf9\x2e\x77\x18\x87\xd3\x0f\x1b\xae\x40\x65\x85\x8c\x10\xa2\x2c\x46\xe0\x0a\x52\x1e\xa1\x50\x18\x43\x21\x62\x94\xa0\x37\x08\x2f\x73\x16\x6d\x10\x5e\x84\xcf\xca\xaf\x90\x64\x85\x88\xa7\x5c\xd0\xf7\xb7\xab\x57\xaf\xdf\xbd\x7f\x0d\x09\x4f\x11\xdc\x3b\x99\x65\x1a\x62\x2e\x31\xd2\x99\xbc\x83\x2c\x01\xed\x2d\xa6\x25\x62\x38\x3d\x5b\xee\xf7\xd3\xe9\xfd\x3d\xc4\x98\x70\x81\x10\xfc\x59\xa0\xbc\x0b\x60\xbf\x37\x2f\x4f\xf2\x2f\x6b\xb8\xb8\x84\x6b\xa6\x10\x4e\xc2\x57\x99\x48\xf8\x3a\xfc\x89\x45\x5f\xd8\x1a\xc1\xcd\xd4\xb8\xcd\x53\xa6\x11\x82\x0d\xb2\x18\x65\x00\x27\xdd\x4f\x7c\x9b\x67\x52\x97\x9f\xec\x13\xcc\xa6\x93\xfb\xfb\x73\x90\x4c\xac\x11\x4e\x72\xa6\x37\x66\xb1\x93\xf0\x3d\xbf\x4e\xb9\x58\xaf\x68\x94\x32\x33\x26\x93\x80\xd8\x31\x43\xf6\xfb\xc0\xce\x43\x11\x9b\x6f\x73\x5a\xea\xe4\xba\xe0\xa9\x91\x16\x51\xf8\xd9\xec\xe2\x1d\xdb\x62\xb9\x11\x89\x11\xf2\x9d\xfd\x5c\xfd\xaf\xe6\x18\x9e\x96\x4b\xf0\xc9\xec\xf7\x46\x13\x46\x8c\xe5\x9b\x24\x93\x40\xd2\xe1\x62\x6d\x86\xe6\x4c\x45\x2c\x85\x93\xd0\xad\x03\x28\x34\xd7\x1c\x55\x38\xd5\x77\x39\xb6\xa9\x29\x2d\x8b\x48\xc3\xfd\x74\x12\x91\x18\xa7\x93\x94\x6f\xb9\x9e\x4c\xce\xb8\xd0\xd3\x49\x96\x24\x0a\xeb\x27\x19\xa3\x9c\x4c\x3e\x7e\xfa\xd1\xfc\x79\x53\x88\x68\x3a\x29\x04\xff\xb3\x40\xf3\x52\x69\xc9\xc5\x7a\x3a\xc9\x25\xc6\x3c\x62\x1a\x15\x4c\x3e\x7e\xaa\x9e\x42\xb3\x72\xc9\x95\x15\xd5\x0d\xd7\x1b\x38\x09\x5f\xc7\x6b\x74\xf2\x5c\x2e\x01\xd9\x1a\xe5\x79\x9a\xb1\xd8\xec\x08\xcd\xb7\x70\x3a\xf1\x55\x82\x46\x5c\xa1\x9d\x30\x31\x54\x31\x7c\x6d\x26\xbd\xcd\x58\xfc\x86\x63\x6a\xe4\x0f\x67\xf6\xc3\x87\xbb\x1c\x9b\x72\x9f\xf8\x5a\xea\xfc\x5f\x9e\xc1\xcb\x38\xe6\x9a\x67\x82\xa5\x90\x18\x6a\x0a\x74\x06\x2c\x8e\xcd\x8f\x27\xf9\x10\x08\xa5\x34\xeb\x44\x6f\xf3\xd4\x70\x95\x4b\x2e\x74\x02\x41\xcc\x59\x8a\x91\x5e\x7e\xaf\x96\xa4\x9c\xa5\xa5\x14\x18\x18\xe9\x4c\x3a\x9c\xd2\x5c\x9e\xc0\x86\xa9\x0f\x25\x26\x2d\xa9\x8a\xcf\x5b\xdd\xfc\x10\x76\xb8\x5e\x2e\x81\x0b\x8d\x72\x8b\x31\x37\xe3\x68\x3d\x98\xf1\x10\x43\xd0\x92\xed\x50\x2a\x96\x82\xc1\xe8\x3c\x9c\x92\xb8\x3c\x16\xc0\x7f\x0e\x7f\xa8\x81\x37\x21\x50\x27\x85\x88\x66\x51\x26\x34\xde\x6a\x63\x67\xe6\x77\x0e\xb3\x81\x49\x0b\x40\x29\x33\x39\x9f\x5a\xdc\xfe\xba\x41\x89\x46\x70\x0a\x18\x08\xbc\x81\x0a\x0a\x04\x5a\x5f\x94\x53\xb3\x90\xa5\x5b\x99\x41\xa9\xc3\x1a\xac\x73\x4b\x72\x96\x2b\x08\xc3\xb0\x1f\x58\xf3\xf6\x24\x03\x6d\x9f\xee\x7e\x1f\x7a\x00\xbd\x04\x96\xe7\x28\xe2\xf6\xd2\xde\x98\x05\xe4\x2a\x0c\xc3\xf9\x74\x22\x51\x17\x52\x40\x6b\xa8\xdb\xed\x5b\x63\x36\xe5\x6e\xc9\x86\x40\x69\xcc\x4b\xd0\x90\x56\x46\xef\x93\x88\xcd\x2c\x15\x2e\xf4\xc1\x4d\x19\x8e\xed\xe8\x4b\x38\xa5\x3f\x07\xb8\xfd\x91\xec\xda\xb1\x2b\xc0\x9a\xf9\x57\x30\x6c\xe9\xcd\x1c\x9d\xb1\x2c\xbb\xe1\x97\x70\x6a\xff\x1d\x62\xda\x78\x9d\x9a\x67\x7a\xfa\x0a\x96\xcd\xfc\x59\x66\xa0\x54\xb9\xb3\x71\x5c\xd3\xc2\x83\xc8\xa1\xcf\x0b\xc8\x0e\x61\xc6\x44\x68\x1b\xfa\x28\xc0\x6e\x98\x02\xc5\xb7\x3c\x65\x92\xeb\x3b\xeb\x1a\x8d\xf3\xa3\x5d\x71\x54\x26\x7c\x46\x29\x47\xa1\x43\x72\x04\xe4\x7c\xee\xef\x4b\x9f\xf8\x79\xe1\xfc\xa2\xef\x4e\xc9\x05\xc6\x6b\xfc\xec\x45\x21\xf2\x50\x30\x2b\xc3\x84\xf3\x90\xc6\x7a\xe6\x10\xfc\x5c\x85\x59\xe3\x56\xe8\xc9\x0b\x29\x58\xc5\x94\x68\xc3\xb8\xb0\x71\x28\x2a\xa4\x34\x49\x85\x75\x3b\x99\x8d\xf1\xd6\xf7\x56\x11\x28\x5e\x63\x38\x9d\x8c\xd4\xcb\xe0\xaa\x33\xa7\x9d\xc6\x8e\xac\x8a\x26\x76\xf5\x8b\x4b\x38\xed\x19\x71\x6f\x43\xdb\x45\x5b\x0b\xa1\x7d\xbf\x2f\xe7\x87\xe4\xf3\x2e\x9d\xd7\xd3\xb7\xd0\xf5\x7c\x89\xcc\xb6\xff\x37\xe4\x34\xc9\xff\x39\x1f\x48\x5c\x4d\x78\x42\xaf\x2e\x2e\x3b\x4b\xe7\x12\x73\x26\x91\x36\x6b\xd6\x9a\xff\x37\x8d\xfc\xee\x12\x04\x4f\xed\xe4\x12\x3b\x82\xa7\x44\xd9\xbc\x73\x21\xcf\x85\x4e\xbc\xd5\x26\x0a\x9c\x40\xf0\x8b\x23\x1d\x78\xab\x04\x06\x08\x81\x81\x45\xb0\x8a\x51\xe8\x00\x02\x62\x3f\x80\x73\x1b\x3a\x09\x1f\x07\x23\x97\x11\x4a\x3b\x6e\x4d\x1e\x0a\x4e\x75\x80\x75\xeb\xb8\x7d\xd0\xe2\x0b\xb3\x9d\xa9\xdd\x88\x7b\x4f\xcb\x4c\x27\x84\x66\x17\xd4\x8c\xb5\xbf\xe1\x52\x69\xb0\x63\x2c\xd4\x12\x7a\xe3\x7b\x7b\x9b\xdc\xdc\x95\xa9\xa5\xd5\x22\xfc\xe2\xe6\x9c\xbd\xcb\xf4\x1b\x93\x8e\xbe\x36\x2a\x81\x9b\x0d\x0a\x10\x99\x21\x90\x66\x37\x26\xd1\xaa\xc8\xdc\x30\x65\x13\xd7\xd1\xde\x83\xb8\x1b\x00\xc9\x99\xcf\xe2\xc2\x03\x84\xc8\x62\x13\x4f\x06\x20\x61\x9d\xfe\xf3\x79\xf8\x32\x4d\x09\x12\xd3\x12\x3f\x1e\x2a\x3a\x98\xd8\xd3\xa8\x14\xc5\x8c\xa8\xcf\xe1\xf2\x12\x9e\x75\x86\x9e\x36\x44\x71\x6f\x85\x58\x67\xcc\xe1\x5b\x76\x8d\xe9\x9e\xa8\x95\xd3\x0c\xb5\x8f\xcf\x3e\x59\x85\x79\x2a\xf9\xcd\x9e\x05\xbe\xa0\x7d\x5c\xc0\x75\xa1\x21\x67\x82\x47\xca\xe4\x32\x4c\xd8\x0d\x43\x16\x45\x85\x54\xc7\x09\xf4\xb7\x7e\x89\x36\x04\x5a\x0a\x72\x50\x8e\x95\x6a\x3a\x02\x3c\x3d\x85\xef\x56\xaa\x14\xc5\x0c\xa5\xb3\x53\xe2\x9e\x1e\xdb\x12\xf0\x37\xbe\xba\x3a\x84\x46\x1e\x1f\x87\x44\x1e\x3f\x16\x79\xab\xab\x01\xec\xf1\xd8\xb2\xb4\xba\x22\xc7\xde\xe3\x95\x76\x4c\x02\x8f\x15\x7c\xfc\xd4\x1a\x48\xd2\xe2\xb1\x03\xe8\x03\xf8\x5c\x5d\xa9\x7e\x97\x65\xc5\xe3\x63\x92\xc7\x3e\x22\x2d\xdd\xb1\x58\xf4\xc9\x39\x95\xf0\xb8\x17\x92\xab\xab\x16\x28\x57\x57\x4f\x0a\xcb\xd5\xd5\x00\x30\x5b\x12\x34\x9b\xe4\xf1\xc3\xc0\xb4\x9a\xfb\x4a\x68\xf2\xb8\x4c\x89\x44\x7a\xd7\x40\x65\x66\x5e\x1c\x72\x91\x8b\x6a\x4a\x25\x16\x9e\x80\xc8\x34\xe0\x2d\x8b\x74\x6a\xe2\x38\x96\x13\x0d\x42\xed\x70\x1c\x0f\x52\xc3\xd7\x5f\xe1\x1d\x5f\x1c\xef\x1d\xd5\x0d\xd7\xd1\xc6\xf7\x90\xe6\xb0\xcb\x14\xc2\xf3\x0b\x6f\x4a\xc3\xdd\xd9\xef\xcf\x2e\x1e\xe9\x45\x63\x4c\x58\x91\xea\xbe\xe9\xef\xb9\x58\x17\x29\x93\x07\xfd\x70\xad\xdf\x1a\xdb\xe6\xe9\xa9\x80\x4d\x94\x9f\xc2\xdd\x96\xaa\xee\x55\xc8\x41\xcf\x6a\x66\xb7\x1c\x6b\x17\xc2\x2d\xbf\x3a\x0e\xbe\xce\xb9\x3e\x0a\xba\xff\x3e\xf7\xfa\x62\x9c\x7b\xf5\x40\x4d\x2e\xb6\x01\x69\x1e\xc3\xa5\x73\x95\x3e\x92\x8f\xf3\xbe\x1e\x86\xeb\x89\xa3\xd1\x5b\xf2\xea\x2b\xb9\x89\xe3\xa7\x73\xd1\x8e\xfa\x53\x78\xe8\x5a\xf7\x47\xa0\xb9\x72\xc6\x2f\xd3\x14\xf0\x16\xa3\x42\xa3\xaa\xd1\x0a\x4c\xc4\x35\x60\x21\xe5\x4a\x43\x96\xd0\x55\x5d\x5a\x48\xff\xaa\x6e\xf4\x8e\x9d\x0b\xec\xc1\xe7\xc7\x4f\x83\xee\xf5\x6b\xce\x22\x7d\x7e\xb5\xff\x64\x1b\xb6\x2e\x98\x2a\x6f\x5d\x89\xa8\x86\xc1\xcb\x34\x7d\x2a\x0c\x18\xba\xfd\x22\x69\x49\xe4\x70\xa0\x79\x28\xbe\x0c\xbb\x33\xe5\x36\xb8\xba\x52\x47\x61\xc0\x77\x72\xe3\xb7\xeb\x5c\x44\x2f\x00\xfa\xfc\xd3\x28\xdf\x34\x20\x8f\xf7\x68\xce\x83\xb3\xb6\xad\xd3\x45\xeb\xea\x6a\x1e\xbe\x8f\x98\x30\xcc\x2c\xe0\xd4\xb8\xa2\x63\xb0\x43\xde\xb0\xce\xe5\x56\x57\xaa\x06\xc7\xea\x4a\x3d\x15\x38\x0c\xdd\x21\x70\xf4\xfa\x87\x61\x70\x94\xbe\xf9\x18\xef\x50\x42\xe3\x55\x56\x88\xe6\x81\x36\xa2\x37\x54\x01\x41\x58\xf3\x1d\x8a\x23\xef\xb0\x88\xe4\x50\xa8\x12\xfa\x89\xcd\xff\xd9\xb1\xc6\x5f\xb1\x37\xf7\x45\x50\xeb\x98\x1e\x9f\x4a\xcb\x96\x76\xbf\x30\xb8\x70\x25\x8e\xc2\x09\xa5\x4f\x0e\x1e\xb7\xa3\xb5\x4b\x14\xdd\xe6\x5e\xdf\x72\xff\xc2\x42\x16\x68\xb6\x53\xfb\x80\x0d\x53\x80\x29\x6e\x51\x68\x55\xe6\x33\x6b\xc9\xf2\xcd\xe8\x2d\xd2\x0a\x03\xea\xbe\xce\xb2\xf4\x89\xf5\x9d\xb0\x54\xe1\xb1\x3a\xaf\x78\x9c\xfb\x62\xa9\x75\x4e\x8f\x4f\xa5\x73\x4b\xbb\x5f\x22\x46\x20\x66\x37\x68\x17\x1c\x10\x86\xc7\xee\x68\xa5\x13\xc5\x12\xd1\xa9\xc9\x35\x6b\xd7\x1e\x17\x79\x6a\x6b\x1c\x99\xaf\x7b\xc7\xf4\x02\xb8\x88\xd2\x82\x2a\x5b\x2c\x4d\x81\x29\x95\x45\x9c\x69\x8c\xe9\x22\x5b\x85\xb0\xd2\x10\x31\x01\xd7\x68\x88\x17\x0a\xa9\xea\xe4\x34\x06\x51\xb6\xdd\x66\xa2\x49\x52\x51\x6c\x29\x14\x9a\xd5\xb6\x10\xf3\x24\x41\x89\xc2\x64\xc1\x2c\xd1\xae\x4e\x1b\x11\x97\x5c\xc1\x96\xc5\x38\xde\xa2\xcc\xac\x59\xef\x9d\xb8\x93\xc4\x69\xf3\x8b\x11\x59\x79\xd7\xda\xb9\x36\xb7\x1f\x16\xd3\x89\xad\x30\x5e\xc0\xa4\xbf\x84\x61\x46\xd8\x72\x40\x0f\x11\xfb\x81\x86\xc8\x18\xa5\x21\xe2\xae\xe1\xbd\xa2\xe4\xfd\x7e\xd1\xd1\x33\x0d\x0f\xc3\x70\x6e\xe6\xda\x9a\xe5\x05\xd4\x73\x6d\xed\xb2\x6f\xa2\x1d\x5b\xce\xac\xcb\x42\x17\x50\x4d\xee\xaf\x44\xf5\x11\xab\xa7\x97\x04\x97\xcb\x52\x39\x9d\x1a\x9e\xad\x7a\x36\x8c\xab\x7b\x85\xdd\x1a\x10\x3a\x9d\x11\xaf\x4c\x6f\xba\x13\xcc\xdb\x85\x3b\x60\xb6\x6b\xaa\x9d\xda\x81\x5f\xbd\xee\xad\xa5\x2e\x97\x00\xbf\x72\xbd\xe9\xad\x12\x68\x4c\x53\x2f\x09\x3a\x2f\xa9\xe9\xcc\x2b\xf2\xda\x01\x94\x42\x81\xde\x30\x0d\x16\xe8\x42\x60\xa4\x09\xfd\xb4\x88\x19\x13\x34\xaa\x0a\x81\x2d\x2b\xc0\x07\x73\x62\xcc\x5d\xbd\x96\xc9\x75\x61\xfd\x6b\x69\x3a\x16\x75\x85\xc4\xae\x31\x96\x16\x7a\x5c\x79\x62\x68\xb7\xb3\x2c\xd7\x54\x97\xa4\xea\xc1\x59\x43\x7c\xfb\xfd\xbc\xd7\x8a\xda\x65\x8b\xa3\x4a\x16\x49\x26\xe1\xf3\xc2\xec\x9d\xba\x07\x48\x8d\xc4\x03\x15\x0f\xb2\x5c\xcf\x88\xfa\xdc\x5d\xb6\xf7\x01\xa7\xaf\x6e\x7e\x59\xde\xc7\x0f\x95\xae\xe8\xa2\xbe\x2a\x3f\x53\x1b\xc3\x5a\x66\x45\xfe\x83\x57\x63\x6a\xf4\x20\xfc\x7f\x55\x5b\xf8\x5e\xfd\x2f\x8d\xb4\x25\x26\xe3\xe1\xdc\x73\xa5\x2e\xa2\x04\x3b\x94\x9a\x47\xa8\xe0\xda\x1e\xe5\x33\x09\xdb\x4c\xa2\x2b\xc7\x2f\xa3\x2c\x2d\xb6\x42\x85\x94\x33\x6a\xe3\xd6\xb2\x44\xa3\xb0\x44\xa8\x30\xc2\xd6\x6b\x89\x6b\xaa\x34\x17\x22\x32\xe0\x50\x0b\x0a\x3f\x24\xd0\x3f\x32\x2e\x60\xf6\x05\xef\x54\x3d\x70\x0e\xc1\x02\x02\x3a\x84\x55\xe5\x95\x14\x05\x9c\xd8\x44\x57\xd9\x8e\x8d\x73\x38\x49\xcc\x06\xb9\x88\xf1\xb6\xfe\xf6\xcc\x7c\x5d\x2e\x6d\xb4\x63\xdb\x3c\xc5\x0b\xfb\x48\x19\xf7\x0e\xc8\xbf\xd8\x36\x8b\xe5\xd2\xaa\x22\x09\xdf\xd3\xab\x4a\xee\xf6\x65\x99\x86\xfe\xee\x8f\xf9\xc0\xd6\xb0\xdf\xff\x4e\x73\x6d\x12\x69\xf2\x99\xdf\xff\x50\x99\xb8\x08\x6c\x4e\x93\x6d\xb9\xc6\x6d\xae\xef\x02\x1a\xe6\xb8\x99\xb8\x82\x61\x4f\x5b\x88\xb5\xe3\xd9\x3c\x24\xaa\x4e\x0d\x9d\x24\xdf\x72\xf1\x2a\x13\x4a\x33\xa1\x0d\x8e\xed\xf8\x97\xa5\xd8\x68\x46\xfe\x65\x5d\xe7\x4f\x73\x37\xc4\x3b\x16\xec\xe6\x86\x1d\x0f\x34\x23\x4d\xad\xe4\x8a\xd4\x0e\xd6\x45\x2f\xca\x9e\x8c\x30\x0c\xed\x1b\x67\x59\x0d\x0c\x5a\xf3\xb2\x60\x2a\xad\xab\x35\xe0\xb0\x85\xd1\x84\xd0\x2d\x77\x09\xed\x58\x41\x1f\xf6\x25\x3f\xb6\xda\x6b\xa7\x1c\x2e\x23\xe6\x12\x77\xa3\xab\x88\x5f\x55\x44\xec\xd6\x10\xf7\x83\xa6\xdd\x0e\x26\x0e\x22\xee\x4a\xb4\xce\x7f\x68\x97\x53\x67\xfb\x8a\x8e\x87\xa3\x8c\xdf\x9e\x24\x2b\xdb\xb7\x8f\x3d\x06\x4e\x95\xc2\xee\x99\xe8\x5b\xb6\xcb\x63\x0d\x6e\xe0\x50\x3d\x64\x6f\x4f\x60\x4c\x6e\xc5\x51\xb6\xd4\xd4\xa9\x35\x26\xfb\x2e\x93\x95\x3d\xb5\x07\x1d\x36\xa8\x92\xc4\x71\x36\x55\xcd\xfa\x4f\x37\xab\x72\xa3\xc6\xb2\x46\x2a\xb5\xcd\x69\x57\x26\xf6\x58\x65\xcf\x83\x7d\xa9\x60\xe3\xb4\x23\x71\x37\x78\x50\x32\x83\xdd\x39\xa9\xe7\xa0\x54\x1d\x8d\x2a\x59\x1c\x10\x02\x5c\x1a\xe6\x77\xb4\x7f\xd7\x05\x77\x12\xbe\x2b\xb6\x3f\x65\x29\x8f\xee\x6c\x1f\x41\x53\x43\xbe\x9d\xd8\x51\xe1\xeb\x1d\x4b\xab\xbd\x77\xb2\xed\x61\xb5\x55\x5c\xfa\x7d\x74\xb5\x4a\x9d\x6b\x6b\xb5\x58\x38\x28\x05\xb5\x06\x02\xc7\x51\x50\x86\xc0\xe9\xa8\x8e\x8a\x6e\x13\x60\x7f\x23\x85\xd7\x0e\x41\xbd\x42\xe4\x76\xaf\xeb\xf4\xb5\x6a\x92\xb5\xa1\xed\x97\xde\x5e\xd2\x56\xd4\xab\x1a\x4a\xdb\xe1\xb2\xa7\xab\x94\x86\x9c\x5f\xdf\x8d\xed\x2a\x6d\x93\xec\xb6\x96\x3a\xbb\xaf\x5b\x45\x13\xa1\x00\x00\x3e\x7e\xaa\x12\x0a\xdb\x54\xfa\xcd\xf6\x34\x56\x7c\xda\x36\xb4\x3a\x46\x95\x89\x24\xcf\x44\x9d\x73\x96\x8d\x69\x95\x24\x3b\xb7\x7b\x4d\xcd\x95\x26\xde\x92\xe4\xbc\x5e\x76\x66\x24\x16\x86\x61\x43\x5e\xc3\x19\x50\xdf\x12\xa1\x21\xd1\xe8\x5e\xeb\x1b\xb1\x80\x44\x74\xdb\x1e\xdb\x23\x9d\x54\x4c\x78\x32\x04\x53\xee\x2e\xbd\x9b\x1b\xa6\x1b\x0a\x65\xc6\x50\xff\x37\xaa\x22\xa5\x14\x36\xf3\xe4\xb7\x63\x69\x81\x8f\x90\x4c\x19\x19\xdb\x9e\x6f\x01\x3b\x0b\xa1\x84\x45\x78\xbf\xf7\x1c\xa1\x2b\x21\x7a\x9e\xa5\xb3\x7f\xcf\xd7\x0d\xd6\x98\xcb\x5b\xb1\x5e\x02\x5d\x67\xe7\x0e\x55\x0f\xc8\xb2\x3d\xa9\x8e\xf9\xbb\xb9\x27\xe7\xfa\x26\xcd\x3c\x1d\x71\x91\x76\x84\x40\x7b\x6f\xd4\x3a\x12\xed\x5c\x32\x76\x76\xe4\x6f\xa1\xe3\x8c\x9b\x77\x6b\xd6\x93\x79\xcd\x8c\xda\xb9\xd0\x2d\xd7\x7c\xe7\xdd\x49\xb8\xa2\x99\x97\x68\x6a\x93\x64\xda\xb7\xee\x4a\xc2\x1b\xb7\xdf\x57\x97\x73\x3d\x95\x37\x93\x62\xd9\x6c\xb3\x44\x6c\x58\x9e\x28\x45\x7a\x07\x2c\x4d\xb3\x1b\x73\xa6\xdc\x94\x59\x28\x17\xeb\x1a\xdc\x14\x20\x4c\xfa\x4a\x7e\xad\x71\x85\x30\x52\xd8\x0d\x46\x1f\xac\xe8\xe8\x56\x29\xa7\x6c\xb0\xe9\xb7\x5f\xf2\xb3\x73\xf8\x1f\x78\xde\x9b\xae\x64\x52\x85\xef\xf0\x66\x16\xd4\xa7\xb7\x8b\x3e\x17\x1e\x36\x05\xc9\x15\x15\xd9\x59\xb4\xe1\xb8\x63\xd7\x29\x5a\xc1\xd0\x24\x23\x18\x4a\xe1\xf5\x86\x09\x78\x6e\x45\x12\x94\x97\x0f\x65\xba\x5d\xee\xa4\x13\xdc\x1f\x80\xce\x69\x0f\x76\x1e\xce\xbf\x76\x55\x6a\xd5\x45\x43\x6d\x3e\x8d\xd7\x07\xed\xe8\x2b\x75\xfb\x60\xfd\x49\x97\xd7\x41\xbb\x87\xdd\x52\x07\x2d\x03\xb9\x98\x6f\x59\x0d\xb9\x58\x91\x50\xf2\xee\x0a\xf9\x4d\x3b\x3a\xf7\xec\xa7\x1a\xe1\x59\x10\x03\xf3\x36\xb5\xb2\xfb\x16\x6c\xc7\x63\x72\xc0\x7a\x3e\x43\xc3\x7a\x7c\x0b\xea\x07\xe5\xce\xef\xcf\x18\xa1\x82\x21\x6c\x3a\xd1\x7b\x8d\x1a\x3b\xbb\x6c\xdd\xa7\x51\xe9\xa5\xee\x3b\xf2\xda\x35\x8e\xed\x96\xf3\x1a\x36\xdc\xd4\x64\xab\x43\x9a\x95\x1c\x6b\xe9\x65\xd3\x0c\x7c\x1f\xbb\x78\xad\xac\x22\x8d\xc6\x6e\x98\x02\xbc\xcd\xe9\x7e\x36\x58\xb8\xad\x35\xa1\xd6\xb0\x3d\x4f\x49\x4d\xeb\xf3\x3e\xfc\x45\xf6\xe7\x2f\x3d\xdc\x1f\x72\x8c\xfd\xb5\x10\xf7\x18\x0b\x6c\xe4\xf5\xc3\xa7\x8c\x76\xe6\x7e\xe8\x6c\x41\xe3\x1f\x7b\xb6\xb0\x67\xcf\x9e\xa3\x85\xfd\xd0\x7f\xb6\x68\xdf\x00\x54\x87\x8b\xce\xfd\x41\xcf\xe9\xc2\xad\xe8\x8e\x04\x2e\x2c\x8f\x38\x65\x74\x68\x8f\x38\x66\x7c\x9b\xc7\x89\xde\xcc\xb9\xba\x66\x79\x7c\xe6\xdc\x52\x59\x69\x20\x6d\xc1\x3d\x4d\xee\xdc\x59\xec\xe8\xe4\xb9\x4b\x61\x4c\xf6\x7c\x70\xd6\x53\xa7\xcf\x47\x49\xf5\x91\x09\x74\x77\x53\xff\xa0\x0c\xba\xba\xa7\x1b\xcc\x02\xec\x08\x93\x06\xf4\x07\xfe\xd1\x22\x7e\x9a\xb4\xb9\x2b\xed\x47\xe7\xcd\x6d\x16\xc7\x25\xce\xb5\x3c\xbe\x22\x73\x7e\x08\x33\xdf\x5c\xea\xfc\x38\x0d\x3f\x26\x79\xee\xf7\x0f\xdf\x62\xf6\xfc\x37\xdb\xcd\x5f\x9d\x32\x8f\x11\xfc\x3f\x34\x67\x3e\x60\xe5\xdf\x74\xd2\xfc\x58\x8c\x1c\x9f\x36\xf7\x03\xe0\xef\xcb\x9b\x3b\x59\xe9\xa1\xc4\x59\xb9\xb2\xe4\x23\x32\xe7\xf2\xef\xbf\x02\x00\x00\xff\xff\x1e\xda\xe6\x8d\x6e\x43\x00\x00") +var _templateBuilderQueryTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xdc\x5a\xed\x6f\xdb\x38\x93\xff\x6c\xff\x15\xb3\x42\x36\xb0\x03\x47\x6e\xfb\xed\x72\xc8\x01\xdd\xa6\x3d\x18\x28\xba\x2f\xed\x61\x17\x28\x8a\x2e\x23\x8d\x6c\x6e\x65\x4a\x4b\x52\x4e\x82\x9c\xff\xf7\x07\x1c\x52\x12\xf5\x16\xcb\x69\x76\x9f\xee\xf3\xc9\x96\x34\x1c\x0e\x67\x7e\xf3\x42\x0e\xef\xef\x97\x67\xd3\x57\x59\x7e\x27\xf9\x7a\xa3\xe1\xc5\xb3\xe7\xff\x75\x9e\x4b\x54\x28\x34\xbc\x61\x11\x5e\x67\xd9\x17\x58\x89\x28\x84\x97\x69\x0a\x44\xa4\xc0\x7c\x97\x3b\x8c\xc3\xe9\x87\x0d\x57\xa0\xb2\x42\x46\x08\x51\x16\x23\x70\x05\x29\x8f\x50\x28\x8c\xa1\x10\x31\x4a\xd0\x1b\x84\x97\x39\x8b\x36\x08\x2f\xc2\x67\xe5\x57\x48\xb2\x42\xc4\x53\x2e\xe8\xfb\xdb\xd5\xab\xd7\xef\xde\xbf\x86\x84\xa7\x08\xee\x9d\xcc\x32\x0d\x31\x97\x18\xe9\x4c\xde\x41\x96\x80\xf6\x26\xd3\x12\x31\x9c\x9e\x2d\xf7\xfb\xe9\xf4\xfe\x1e\x62\x4c\xb8\x40\x08\xfe\x2c\x50\xde\x05\xb0\xdf\x9b\x97\x27\xf9\x97\x35\x5c\x5c\xc2\x35\x53\x08\x27\xe1\xab\x4c\x24\x7c\x1d\xfe\xc4\xa2\x2f\x6c\x8d\xe0\x46\x6a\xdc\xe6\x29\xd3\x08\xc1\x06\x59\x8c\x32\x80\x93\xee\x27\xbe\xcd\x33\xa9\xcb\x4f\xf6\x09\x66\xd3\xc9\xfd\xfd\x39\x48\x26\xd6\x08\x27\x39\xd3\x1b\x33\xd9\x49\xf8\x9e\x5f\xa7\x5c\xac\x57\x44\xa5\xcc\x88\xc9\x24\x20\x71\x0c\xc9\x7e\x1f\xd8\x71\x28\x62\xf3\x6d\x4e\x53\x9d\x5c\x17\x3c\x35\xda\x22\x0e\x3f\x9b\x55\xbc\x63\x5b\x2c\x17\x22\x31\x42\xbe\xb3\x9f\xab\xff\xd5\x18\x23\xd3\x72\x09\x3e\x9b\xfd\xde\x58\xc2\xa8\xb1\x7c\x93\x64\x12\x48\x3b\x5c\xac\x0d\x69\xce\x54\xc4\x52\x38\x09\xdd\x3c\x80\x42\x73\xcd\x51\x85\x53\x7d\x97\x63\x9b\x9b\xd2\xb2\x88\x34\xdc\x4f\x27\x11\xa9\x71\x3a\x49\xf9\x96\xeb\xc9\xe4\x8c\x0b\x3d\x9d\x64\x49\xa2\xb0\x7e\x92\x31\xca\xc9\xe4\xe3\xa7\x1f\xcd\x9f\x37\x85\x88\xa6\x93\x42\xf0\x3f\x0b\x34\x2f\x95\x96\x5c\xac\xa7\x93\x5c\x62\xcc\x23\xa6\x51\xc1\xe4\xe3\xa7\xea\x29\x34\x33\x97\x52\x59\x55\xdd\x70\xbd\x81\x93\xf0\x75\xbc\x46\xa7\xcf\xe5\x12\x90\xad\x51\x9e\xa7\x19\x8b\xcd\x8a\xd0\x7c\x0b\xa7\x13\xdf\x24\x68\xd4\x15\xda\x01\x13\xc3\x15\xc3\xd7\x66\xd0\xdb\x8c\xc5\x6f\x38\xa6\x46\xff\x70\x66\x3f\x7c\xb8\xcb\xb1\xa9\xf7\x89\x6f\xa5\xce\xff\xe5\x19\xbc\x8c\x63\xae\x79\x26\x58\x0a\x89\xe1\xa6\x40\x67\xc0\xe2\xd8\xfc\x78\x9a\x0f\x81\x50\x4a\xa3\x4e\xf4\x36\x4f\x8d\x54\xb9\xe4\x42\x27\x10\xc4\x9c\xa5\x18\xe9\xe5\xf7\x6a\x49\xc6\x59\x5a\x4e\x81\x81\x91\xce\xa4\xc3\x29\x8d\xe5\x09\x6c\x98\xfa\x50\x62\xd2\xb2\xaa\xe4\xbc\xd5\xcd\x0f\x61\x47\xea\xe5\x12\xb8\xd0\x28\xb7\x18\x73\x43\x47\xf3\xc1\x8c\x87\x18\x82\x96\x6c\x87\x52\xb1\x14\x0c\x46\xe7\xe1\x94\xd4\xe5\x89\x00\xfe\x73\xf8\x43\x0d\xbc\x09\x81\x3a\x29\x44\x34\x8b\x32\xa1\xf1\x56\x1b\x3f\x33\xbf\x73\x98\x0d\x0c\x5a\x00\x4a\x99\xc9\xf9\xd4\xe2\xf6\xd7\x0d\x4a\x34\x8a\x53\xc0\x40\xe0\x0d\x54\x50\x20\xd0\xfa\xaa\x9c\x9a\x89\x2c\xdf\xca\x0d\x4a\x1b\xd6\x60\x9d\x5b\x96\xb3\x5c\x41\x18\x86\xfd\xc0\x9a\xb7\x07\x19\x68\xfb\x7c\xf7\xfb\xd0\x03\xe8\x25\xb0\x3c\x47\x11\xb7\xa7\xf6\x68\x16\x90\xab\x30\x0c\xe7\xd3\x89\x44\x5d\x48\x01\x2d\x52\xb7\xda\xb7\xc6\x6d\xca\xd5\x92\x0f\x81\xd2\x98\x97\xa0\x21\xab\x8c\x5e\x27\x31\x9b\x59\x2e\x5c\xe8\x83\x8b\x32\x12\x5b\xea\x4b\x38\xa5\x3f\x07\xa4\xfd\x91\xfc\xda\x89\x2b\xc0\xba\xf9\x57\x08\x6c\xf9\xcd\x1c\x9f\xb1\x22\x3b\xf2\x4b\x38\xb5\xff\x0e\x09\x6d\xa2\x4e\x2d\x33\x3d\x7d\x85\xc8\x66\xfc\x2c\x33\x50\xaa\xc2\xd9\x38\xa9\x69\xe2\x41\xe4\xd0\xe7\x05\x64\x87\x30\x63\x32\xb4\x4d\x7d\x94\x60\x37\x4c\x81\xe2\x5b\x9e\x32\xc9\xf5\x9d\x0d\x8d\x26\xf8\xd1\xaa\x38\x2a\x93\x3e\xa3\x94\xa3\xd0\x21\x05\x02\x0a\x3e\xf7\xf7\x65\x4c\xfc\xbc\x70\x71\xd1\x0f\xa7\x14\x02\xe3\x35\x7e\xf6\xb2\x10\x45\x28\x98\x95\x69\xc2\x45\x48\xe3\x3d\x73\x08\x7e\xae\xd2\xac\x09\x2b\xf4\xe4\xa5\x14\xac\x72\x4a\xb4\x61\x5c\xd8\x3c\x14\x15\x52\x9a\xa2\xc2\x86\x9d\xcc\xe6\x78\x1b\x7b\xab\x0c\x14\xaf\x31\x9c\x4e\x46\xda\x65\x70\xd6\x99\xb3\x4e\x63\x45\xd6\x44\x13\x3b\xfb\xc5\x25\x9c\xf6\x50\xdc\xdb\xd4\x76\xd1\xb6\x42\x68\xdf\xef\xcb\xf1\x21\xc5\xbc\x4b\x17\xf5\xf4\x2d\x74\x23\x5f\x22\xb3\xed\xff\x0d\x05\x4d\x8a\x7f\x2e\x06\x92\x54\x13\x9e\xd0\xab\x8b\xcb\xce\xd4\xb9\xc4\x9c\x49\xa4\xc5\x9a\xb9\xe6\xff\x4d\x94\xdf\x5d\x82\xe0\xa9\x1d\x5c\x62\x47\xf0\x94\x38\x9b\x77\x2e\xe5\xb9\xd4\x89\xb7\xda\x64\x81\x13\x08\x7e\x71\xac\x03\x6f\x96\xc0\x00\x21\x30\xb0\x08\x56\x31\x0a\x1d\x40\x40\xe2\x07\x70\x6e\x53\x27\xe1\xe3\x60\xe6\x32\x4a\x69\xe7\xad\xc9\x43\xc9\xa9\x4e\xb0\x6e\x1e\xb7\x0e\x9a\x7c\x61\x96\x33\xb5\x0b\x71\xef\x69\x9a\xe9\x84\xd0\xec\x92\x9a\xf1\xf6\x37\x5c\x2a\x0d\x96\xc6\x42\x2d\xa1\x37\x7e\xb4\xb7\xc5\xcd\x5d\x59\x5a\x5a\x2b\xc2\x2f\x6e\xcc\xd9\xbb\x4c\xbf\x31\xe5\xe8\x6b\x63\x12\xb8\xd9\xa0\x00\x91\x19\x06\x69\x76\x63\x0a\xad\x8a\xcd\x0d\x53\xb6\x70\x1d\x1d\x3d\x48\xba\x01\x90\x9c\xf9\x22\x2e\x3c\x40\x88\x2c\x36\xf9\x64\x00\x12\x36\xe8\x3f\x9f\x87\x2f\xd3\x94\x20\x31\x2d\xf1\xe3\xa1\xa2\x83\x89\x3d\x51\xa5\x28\x66\xc4\x7d\x0e\x97\x97\xf0\xac\x43\x7a\xda\x50\xc5\xbd\x55\x62\x5d\x31\x87\x6f\xd9\x35\xa6\x7b\xe2\x56\x0e\x33\xdc\x3e\x3e\xfb\x64\x0d\xe6\x99\xe4\x37\xbb\x17\xf8\x82\xf6\x71\x01\xd7\x85\x86\x9c\x09\x1e\x29\x53\xcb\x30\x61\x17\x0c\x59\x14\x15\x52\x1d\xa7\xd0\xdf\xfa\x35\xda\x50\x68\xa9\xc8\x41\x3d\x56\xa6\xe9\x28\xf0\xf4\x14\xbe\x5b\xa9\x52\x15\x33\x94\xce\x4f\x49\x7a\x7a\x6c\x6b\xc0\x5f\xf8\xea\xea\x10\x1a\x79\x7c\x1c\x12\x79\xfc\x58\xe4\xad\xae\x06\xb0\xc7\x63\x2b\xd2\xea\x8a\x02\x7b\x4f\x54\xda\x31\x09\x3c\x56\xf0\xf1\x53\x8b\x90\xb4\xc5\x63\x07\xd0\x07\xf0\xb9\xba\x52\xfd\x21\xcb\xaa\xc7\xc7\x24\x8f\x7d\x44\x5a\xbe\x63\xb1\xe8\xb3\x73\x26\xe1\x71\x2f\x24\x57\x57\x2d\x50\xae\xae\x9e\x14\x96\xab\xab\x01\x60\xb6\x34\x68\x16\xc9\xe3\x87\x81\x69\x2d\xf7\x95\xd0\xe4\x71\x59\x12\x89\xf4\xae\x81\xca\xcc\xbc\x38\x14\x22\x17\xd5\x90\x4a\x2d\x3c\x01\x91\x69\xc0\x5b\x16\xe9\xd4\xe4\x71\x2c\x07\x1a\x84\x5a\x72\x1c\x0f\x52\x23\xd7\x5f\x11\x1d\x5f\x1c\x1f\x1d\xd5\x0d\xd7\xd1\xc6\x8f\x90\x66\xb3\xcb\x14\xc2\xf3\x0b\x6f\x48\x23\xdc\xd9\xef\xcf\x2e\x1e\x19\x45\x63\x4c\x58\x91\xea\xbe\xe1\xef\xb9\x58\x17\x29\x93\x07\xe3\x70\x6d\xdf\x1a\xdb\xe6\xe9\xa9\x80\x4d\x9c\x9f\x22\xdc\x96\xa6\xee\x35\xc8\xc1\xc8\x6a\x46\xb7\x02\x6b\x17\xc2\xad\xb8\x3a\x0e\xbe\x2e\xb8\x3e\x0a\xba\xff\xbe\xf0\xfa\x62\x5c\x78\xf5\x40\x4d\x21\xb6\x01\x69\x1e\xc3\xa5\x0b\x95\x3e\x92\x8f\x8b\xbe\x1e\x86\xeb\x81\xa3\xd1\x5b\xca\xea\x1b\xb9\x89\xe3\xa7\x0b\xd1\x8e\xfb\x53\x44\xe8\xda\xf6\x47\xa0\xb9\x0a\xc6\x2f\xd3\x14\xf0\x16\xa3\x42\xa3\xaa\xd1\x0a\x4c\xc4\x35\x60\x21\xe5\x4a\x43\x96\xd0\x51\x5d\x5a\x48\xff\xa8\x6e\xf4\x8a\x5d\x08\xec\xc1\xe7\xc7\x4f\x83\xe1\xf5\x6b\xf6\x22\x7d\x71\xb5\x7f\x67\x1b\xb6\x0e\x98\xaa\x68\x5d\xa9\xa8\x86\xc1\xcb\x34\x7d\x2a\x0c\x18\xbe\xfd\x2a\x69\x69\xe4\x70\xa2\x79\x28\xbf\x0c\x87\x33\xe5\x16\xb8\xba\x52\x47\x61\xc0\x0f\x72\xe3\x97\xeb\x42\x44\x2f\x00\xfa\xe2\xd3\xa8\xd8\x34\xa0\x8f\xf7\x68\xf6\x83\xb3\xb6\xaf\xd3\x41\xeb\xea\x6a\x1e\xbe\x8f\x98\x30\xc2\x2c\xe0\xd4\x84\xa2\x63\xb0\x43\xd1\xb0\xae\xe5\x56\x57\xaa\x06\xc7\xea\x4a\x3d\x15\x38\x0c\xdf\x21\x70\xf4\xc6\x87\x61\x70\x94\xb1\xf9\x98\xe8\x50\x42\xe3\x55\x56\x88\xe6\x86\x36\xa2\x37\xd4\x01\x41\x58\xf3\x1d\x8a\x23\xcf\xb0\x88\xe5\x50\xaa\x12\xfa\x89\xdd\xff\xd9\xb1\xce\x5f\x89\x37\xf7\x55\x50\xdb\x98\x1e\x9f\xca\xca\x96\x77\xbf\x32\xb8\x70\x2d\x8e\xc2\x29\xa5\x4f\x0f\x9e\xb4\xa3\xad\x4b\x1c\xdd\xe2\x5e\xdf\x72\xff\xc0\x42\x16\x68\x96\x53\xc7\x80\x0d\x53\x80\x29\x6e\x51\x68\x55\xd6\x33\x6b\xc9\xf2\xcd\xe8\x25\xd2\x0c\x03\xe6\xbe\xce\xb2\xf4\x89\xed\x9d\xb0\x54\xe1\xb1\x36\xaf\x64\x9c\xfb\x6a\xa9\x6d\x4e\x8f\x4f\x65\x73\xcb\xbb\x5f\x23\x46\x21\x66\x35\x68\x27\x1c\x50\x86\x27\xee\x68\xa3\x13\xc7\x12\xd1\xa9\xa9\x35\xeb\xd0\x1e\x17\x79\x6a\x7b\x1c\x99\x6f\x7b\x27\xf4\x02\xb8\x88\xd2\x82\x3a\x5b\x2c\x4d\x81\x29\x95\x45\x9c\x69\x8c\xe9\x20\x5b\x85\xb0\xd2\x10\x31\x01\xd7\x68\x98\x17\x0a\xa9\xeb\xe4\x2c\x06\x51\xb6\xdd\x66\xa2\xc9\x52\x51\x6e\x29\x14\x9a\xd9\xb6\x10\xf3\x24\x41\x89\xc2\x54\xc1\x2c\xd1\xae\x4f\x1b\x91\x94\x5c\xc1\x96\xc5\x38\xde\xa3\xcc\xa8\x59\xef\x99\x38\x4f\xda\x9a\x34\xbb\xfc\x6e\xc8\xf7\xd5\x76\xda\x64\x63\x08\xcb\x83\xd9\xce\x19\xbb\xfd\xb0\x98\x4e\x6c\x3b\xf2\x02\x26\xfd\xfd\x0e\x43\x61\x7b\x07\x3d\x4c\xec\x07\x22\x91\x31\x4a\xc3\xc4\x9d\xd9\x7b\x1d\xcc\xfb\xfd\xa2\x03\x0a\x22\x0f\xc3\x70\x6e\xc6\xda\x06\xe7\x05\xd4\x63\x6d\xa3\xb3\x6f\xa0\xa5\x2d\x47\xd6\x3d\xa4\x0b\xa8\x06\xf7\xb7\xad\xfa\x98\xd5\xc3\x4b\x86\xed\x1e\x68\xa3\x75\x3a\xd4\x09\xed\x1e\x7b\x0f\x10\x86\xce\xde\x8b\x56\x8b\x74\xb2\x5c\x96\x00\xea\xf4\x19\x6d\x67\xb6\x11\x00\xfa\xe7\xf3\x08\xfc\x79\x72\xa6\x37\xdd\x01\xe6\xed\xc2\x6d\x82\x1f\x5a\x33\x2d\xc4\xef\xb0\xf7\xf6\x7b\x97\x4b\x80\x5f\xb9\xde\xf4\x76\x32\x34\xa6\xa9\x57\xa8\x9d\x97\xdc\x74\xe6\x35\xa2\x2d\x01\x95\x79\xa0\x37\x4c\x83\x75\x46\x21\x30\xd2\xe4\xa1\x34\x89\xa1\x09\x1a\x9d\x8f\xc0\xb6\x3e\xe0\x83\xd9\xd5\xe6\xae\xa7\xcc\xe4\xba\xb0\x39\xa0\x74\x6f\x0b\xf6\x42\x62\x37\x60\x94\x51\xe4\xb8\x16\xca\xd0\x6a\x67\x59\xae\xa9\x77\x4a\x1d\x8e\xb3\x86\xfa\xf6\xfb\x79\xaf\xa7\xb7\x5b\x2b\x47\xb5\x55\x92\x4c\xc2\xe7\x85\x59\x3b\xdd\x70\x20\x33\x92\x0c\xd4\xe0\xc8\x72\x3d\x23\xee\x73\xd7\x10\x18\x09\x54\xb8\x2c\x7b\x06\x43\xed\x35\x6a\x26\x54\x08\xa6\xab\x16\x6b\x99\x15\xf9\x0f\x5e\x1f\xac\x71\x4f\xe2\xff\xab\xfe\xc7\xf7\xea\x7f\x89\xd2\xb6\xc1\x4c\x14\x76\xcf\x95\xb9\x88\x13\xec\x50\x6a\x1e\xa1\x82\x6b\x7b\xdc\x90\x49\xd8\x66\x12\xdd\x95\x81\x65\x94\xa5\xc5\x56\xa8\x90\xea\x5a\x6d\x42\x6f\x96\x68\x14\x96\x09\x35\x6f\xd8\x7a\x2d\x71\x4d\xdd\xf0\x42\x44\x06\x1c\x6a\x41\x29\x92\x14\xfa\x47\xc6\x05\xcc\xbe\xe0\x9d\xaa\x09\xe7\x10\x2c\x20\xa0\x8d\x62\xd5\x02\x4a\x51\xc0\x89\x2d\xc6\x95\xbd\x55\x72\x0e\x27\x89\x59\x20\x17\x31\xde\xd6\xdf\x9e\x99\xaf\xcb\xa5\xcd\xc8\x6c\x9b\xa7\x78\x61\x1f\x69\x57\xb0\x03\x0a\x6b\xf6\x2a\xc8\x72\x69\x4d\x91\x84\xef\xe9\x55\xa5\x77\xfb\xb2\x2c\x95\x7f\xf7\x69\x3e\xb0\x35\xec\xf7\xbf\xd3\x58\x5b\xe8\x9a\x9a\xeb\xf7\x3f\x54\x26\x2e\x02\x5b\x77\x65\x5b\xae\x71\x9b\xeb\xbb\x80\xc8\x9c\x34\x13\xd7\xd4\xec\xb9\xba\x62\xfd\x78\x36\x0f\x89\xab\x33\x43\x67\x23\x62\xa5\x78\x95\x09\xa5\x99\xd0\x06\xc7\x96\xfe\x65\xa9\x36\x1a\x91\x7f\x59\xd7\x35\xde\xdc\x91\x78\x5b\x97\xdd\xdc\x88\xe3\x81\x66\xa4\xab\x95\x52\x91\xd9\xc1\x66\x86\x45\x79\x6f\x24\x0c\x43\xfb\xc6\x79\x56\x03\x83\xd6\xbd\x2c\x98\x4a\xef\x6a\x11\x1c\xf6\x30\x1a\x10\xba\xe9\x2e\xa1\x9d\xa2\xe8\xc3\xbe\x94\xc7\x76\xa4\xed\x90\xc3\xad\xce\x5c\xe2\x6e\x74\xa7\xf3\xab\x1a\x9d\xdd\x3e\xe7\x7e\xd0\xb5\xdb\xc9\xc4\x41\x64\xd1\x2e\x36\x68\x95\x53\xe7\xfb\x8a\xb6\xb0\xa3\x9c\xdf\xee\x76\x2b\xdf\xb7\x8f\x3d\x0e\x4e\xdd\xcc\xee\xbe\xed\x5b\xf6\xcb\x63\x1d\x6e\x60\xe3\x3f\xe4\x6f\x4f\xe0\x4c\x6e\xc6\x51\xbe\xd4\xb4\xa9\x75\x26\xfb\x2e\x93\x95\x3f\xb5\x89\x0e\x3b\x54\xc9\xe2\x38\x9f\xaa\x46\xfd\xa7\xbb\x55\xb9\x50\xe3\x59\x23\x8d\xda\x96\xb4\xab\x13\xbb\xf5\xeb\xdd\x55\x58\x85\xfa\x3b\x32\x89\xbb\xc1\xcd\x9c\x21\x76\x7b\xb9\x9e\xcd\x5c\xb5\x7d\xab\x74\x71\x40\x09\x70\x69\x84\xdf\xd1\xfa\xdd\x4d\xbd\x93\xf0\x5d\xb1\xfd\x29\x4b\x79\x74\x67\x6b\xe3\xa6\x85\x7c\x3f\xb1\x54\xe1\xeb\x1d\x4b\xab\xb5\x77\x8a\xfc\x61\xb3\x55\x52\xfa\xa5\xb8\xb7\xb1\xb2\xa1\xad\x75\x0d\xc4\x41\x29\xa8\x2d\x10\x38\x89\x82\x32\x05\x4e\x47\xdd\xfa\xe8\x5e\x54\xec\xbf\xec\xe1\x5d\xd9\xa0\xfb\x4c\x14\x76\xaf\xeb\xf2\xb5\xba\xc8\x6b\x53\xdb\x2f\xbd\xf7\x5d\x5b\x59\xaf\xba\xf4\xda\x4e\x97\x3d\x37\x5f\x89\xe4\xfc\xfa\x6e\xec\xcd\xd7\x36\xcb\xee\xf5\x57\xe7\xf7\xf5\x75\xd6\x44\x28\x00\x80\x8f\x9f\xaa\x82\xc2\x5e\x7c\xfd\x66\xef\x5d\x56\x72\xda\xab\x72\x75\x8e\x2a\x0b\x49\x9e\x89\xba\xe6\x2c\x2f\xcf\x55\x9a\xec\x9c\x40\x36\x2d\x57\xba\x78\x4b\x93\xf3\x7a\xda\x99\xd1\x58\x18\x86\x0d\x7d\x0d\x57\x40\x7d\x53\x84\x86\x45\xe3\x86\x5d\x1f\xc5\x02\x12\xd1\xbd\x9a\xd9\xa6\x74\x5a\x31\xe9\xc9\x30\x4c\xb9\x3b\x98\x6f\x2e\x98\x4e\x51\x94\xa1\xa1\x3b\xea\xa8\x8a\x94\x4a\xd8\xcc\xd3\xdf\x8e\xa5\x05\x3e\x42\x33\x65\x66\x6c\x47\xbe\x05\xec\x2c\x84\x12\x16\xe1\xfd\xde\x0b\x84\xae\xcd\xe9\x45\x96\xce\xfa\xbd\x58\x37\xd8\x07\x2f\x4f\xee\x7a\x19\x74\x83\x9d\xdb\x54\x3d\xa0\xcb\xf6\xa0\x3a\xe7\xef\xe6\x9e\x9e\xeb\xd3\x3e\xf3\x74\xc4\x61\xdf\x11\x0a\xed\x3d\xf5\xeb\x68\xb4\x73\x10\xda\x59\x91\xbf\x84\x4e\x30\x6e\x9e\xff\xd9\x48\xe6\x5d\xb8\xd4\x2e\x84\x6e\xb9\xe6\x3b\xef\x4c\xc2\x35\xf6\xbc\x42\x53\x9b\x22\xd3\xbe\x75\x47\x12\x1e\xdd\x7e\x5f\x1d\x20\xf6\x74\x07\x4d\x89\x65\xab\xcd\x12\xb1\x61\xb9\xa3\x14\xe9\x1d\xb0\x34\xcd\x6e\xcc\x9e\x72\x53\x56\xa1\x5c\xac\x6b\x70\x53\x82\x30\xe5\x2b\xc5\xb5\xc6\x11\xc2\x48\x65\x37\x04\x7d\xb0\xeb\xa4\x5b\xed\xa6\xf2\x12\x50\xbf\xff\x52\x9c\x9d\xc3\xff\xc0\xf3\xde\x72\x25\x93\x2a\x7c\x87\x37\xb3\xa0\xde\xbd\x5d\xf4\x85\xf0\xb0\xa9\x48\xae\xe8\x22\x00\x8b\x36\x1c\x77\xec\x3a\x45\xab\x18\x1a\x64\x14\x43\x25\xbc\xde\x30\x01\xcf\xad\x4a\x82\xf2\xf0\xa1\x2c\xb7\xcb\x95\x74\x92\xfb\x03\xd0\x39\xed\xc1\xce\xc3\xf5\xd7\xae\x2a\xad\xba\x68\xa8\xdd\xa7\xf1\xfa\xa0\x1f\x7d\xa5\x6d\x1f\xec\x91\xe9\xf2\x38\x68\xf7\x70\x58\xea\xa0\x65\xa0\x16\xf3\x3d\xab\xa1\x17\xab\x12\x2a\xde\xdd\x65\x83\xa6\x1f\x9d\x7b\xfe\x53\x51\x78\x1e\xc4\xc0\xbc\x4d\xad\xee\xbe\x05\xdf\xf1\x84\x1c\xf0\x9e\xcf\xd0\xf0\x1e\xdf\x83\xfa\x41\xb9\xf3\xef\x90\x8c\x30\xc1\x10\x36\x9d\xea\xbd\xcb\x24\x3b\x3b\x6d\x7d\x97\xa4\xb2\x4b\x7d\x37\xca\xbb\x52\x72\xec\x8d\x3e\xef\x52\x89\x1b\x9a\x6c\x75\x48\xa3\x92\x63\x3d\xbd\xbc\xd8\x03\xdf\xc7\x2e\x5f\x2b\x6b\x48\x63\xb1\x1b\xa6\x00\x6f\x73\x3a\x9f\x0d\x16\x6e\x69\x4d\xa8\x35\x7c\xcf\x33\x52\xd3\xfb\xbc\x0f\x7f\x91\xff\xf9\x53\x0f\xdf\x61\x39\xc6\xff\x5a\x88\x7b\x8c\x07\x36\xea\xfa\xe1\x5d\x46\xbb\x72\x3f\xb4\xb7\x20\xfa\xc7\xee\x2d\xec\xde\xb3\x67\x6b\x61\x3f\xf4\xef\x2d\xda\x27\x00\xd5\xe6\xa2\x73\x7e\xd0\xb3\xbb\x70\x33\xba\x2d\x81\x4b\xcb\x23\x76\x19\x1d\xde\x23\xb6\x19\xdf\xe6\x76\xa2\xb7\x72\xae\x8e\x59\x1e\x5f\x39\xb7\x4c\x56\x3a\x48\x5b\x71\x4f\x53\x3b\x77\x26\x3b\xba\x78\xee\x72\x18\x53\x3d\x1f\x1c\xf5\xd4\xe5\xf3\x51\x5a\x7d\x64\x01\xdd\x5d\xd4\x3f\xa8\x82\xae\xce\xe9\x06\xab\x00\x4b\x61\xca\x80\xfe\xc4\x3f\x5a\xc5\x4f\x53\x36\x77\xb5\xfd\xe8\xba\xb9\x2d\xe2\xb8\xc2\xb9\xd6\xc7\x57\x54\xce\x0f\x61\xe6\x9b\x2b\x9d\x1f\x67\xe1\xc7\x14\xcf\xfd\xf1\xe1\x5b\xac\x9e\xff\x66\xbf\xf9\xab\x4b\xe6\x31\x8a\xff\x87\xd6\xcc\x07\xbc\xfc\x9b\x2e\x9a\x1f\x8b\x91\xe3\xcb\xe6\x7e\x00\xfc\x7d\x75\x73\xa7\x2a\x3d\x54\x38\x2b\xd7\x96\x7c\x44\xe5\x5c\xfe\xfd\x57\x00\x00\x00\xff\xff\x17\x41\x77\x00\x12\x44\x00\x00") func templateBuilderQueryTmplBytes() ([]byte, error) { return bindataRead( @@ -245,7 +245,7 @@ func templateBuilderQueryTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/builder/query.tmpl", size: 17262, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/builder/query.tmpl", size: 17426, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/builder/query.tmpl b/entc/gen/template/builder/query.tmpl index 2774d6fe7..72d0d6b11 100644 --- a/entc/gen/template/builder/query.tmpl +++ b/entc/gen/template/builder/query.tmpl @@ -254,6 +254,9 @@ func ({{ $receiver }} *{{ $builder }}) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func ({{ $receiver }} *{{ $builder }}) Clone() *{{ $builder }} { + if {{ $receiver }} == nil { + return nil + } return &{{ $builder }}{ config: {{ $receiver }}.config, limit: {{ $receiver }}.limit, @@ -261,6 +264,9 @@ func ({{ $receiver }} *{{ $builder }}) Clone() *{{ $builder }} { order: append([]OrderFunc{}, {{ $receiver }}.order...), unique: append([]string{}, {{ $receiver }}.unique...), predicates: append([]predicate.{{ $.Name }}{}, {{ $receiver }}.predicates...), + {{- range $e := $.Edges }} + {{ $e.EagerLoadField }}: {{ $receiver }}.{{ $e.EagerLoadField }}.Clone(), + {{- end }} // clone intermediate query. {{ $.Storage }}: {{ $receiver }}.{{ $.Storage }}.Clone(), path: {{ $receiver }}.path, diff --git a/entc/integration/config/ent/user_query.go b/entc/integration/config/ent/user_query.go index c4fd6ac1f..1aac4aa17 100644 --- a/entc/integration/config/ent/user_query.go +++ b/entc/integration/config/ent/user_query.go @@ -222,6 +222,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, diff --git a/entc/integration/customid/ent/blob_query.go b/entc/integration/customid/ent/blob_query.go index 4fcd3d95e..b2fafd8ff 100644 --- a/entc/integration/customid/ent/blob_query.go +++ b/entc/integration/customid/ent/blob_query.go @@ -272,6 +272,9 @@ func (bq *BlobQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (bq *BlobQuery) Clone() *BlobQuery { + if bq == nil { + return nil + } return &BlobQuery{ config: bq.config, limit: bq.limit, @@ -279,6 +282,8 @@ func (bq *BlobQuery) Clone() *BlobQuery { order: append([]OrderFunc{}, bq.order...), unique: append([]string{}, bq.unique...), predicates: append([]predicate.Blob{}, bq.predicates...), + withParent: bq.withParent.Clone(), + withLinks: bq.withLinks.Clone(), // clone intermediate query. sql: bq.sql.Clone(), path: bq.path, diff --git a/entc/integration/customid/ent/car_query.go b/entc/integration/customid/ent/car_query.go index 42352c118..f5f9c9f39 100644 --- a/entc/integration/customid/ent/car_query.go +++ b/entc/integration/customid/ent/car_query.go @@ -248,6 +248,9 @@ func (cq *CarQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CarQuery) Clone() *CarQuery { + if cq == nil { + return nil + } return &CarQuery{ config: cq.config, limit: cq.limit, @@ -255,6 +258,7 @@ func (cq *CarQuery) Clone() *CarQuery { order: append([]OrderFunc{}, cq.order...), unique: append([]string{}, cq.unique...), predicates: append([]predicate.Car{}, cq.predicates...), + withOwner: cq.withOwner.Clone(), // clone intermediate query. sql: cq.sql.Clone(), path: cq.path, diff --git a/entc/integration/customid/ent/group_query.go b/entc/integration/customid/ent/group_query.go index 16d76234b..ae1b6055b 100644 --- a/entc/integration/customid/ent/group_query.go +++ b/entc/integration/customid/ent/group_query.go @@ -248,6 +248,9 @@ func (gq *GroupQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GroupQuery) Clone() *GroupQuery { + if gq == nil { + return nil + } return &GroupQuery{ config: gq.config, limit: gq.limit, @@ -255,6 +258,7 @@ func (gq *GroupQuery) Clone() *GroupQuery { order: append([]OrderFunc{}, gq.order...), unique: append([]string{}, gq.unique...), predicates: append([]predicate.Group{}, gq.predicates...), + withUsers: gq.withUsers.Clone(), // clone intermediate query. sql: gq.sql.Clone(), path: gq.path, diff --git a/entc/integration/customid/ent/pet_query.go b/entc/integration/customid/ent/pet_query.go index 60eb5c20e..fa6df5dec 100644 --- a/entc/integration/customid/ent/pet_query.go +++ b/entc/integration/customid/ent/pet_query.go @@ -319,13 +319,20 @@ func (pq *PetQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (pq *PetQuery) Clone() *PetQuery { + if pq == nil { + return nil + } return &PetQuery{ - config: pq.config, - limit: pq.limit, - offset: pq.offset, - order: append([]OrderFunc{}, pq.order...), - unique: append([]string{}, pq.unique...), - predicates: append([]predicate.Pet{}, pq.predicates...), + config: pq.config, + limit: pq.limit, + offset: pq.offset, + order: append([]OrderFunc{}, pq.order...), + unique: append([]string{}, pq.unique...), + predicates: append([]predicate.Pet{}, pq.predicates...), + withOwner: pq.withOwner.Clone(), + withCars: pq.withCars.Clone(), + withFriends: pq.withFriends.Clone(), + withBestFriend: pq.withBestFriend.Clone(), // clone intermediate query. sql: pq.sql.Clone(), path: pq.path, diff --git a/entc/integration/customid/ent/user_query.go b/entc/integration/customid/ent/user_query.go index 9ef708886..f89cd5215 100644 --- a/entc/integration/customid/ent/user_query.go +++ b/entc/integration/customid/ent/user_query.go @@ -319,13 +319,20 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withGroups: uq.withGroups.Clone(), + withParent: uq.withParent.Clone(), + withChildren: uq.withChildren.Clone(), + withPets: uq.withPets.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/entc/integration/ent/card_query.go b/entc/integration/ent/card_query.go index c3f1a2d9f..1e21f38f9 100644 --- a/entc/integration/ent/card_query.go +++ b/entc/integration/ent/card_query.go @@ -273,6 +273,9 @@ func (cq *CardQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CardQuery) Clone() *CardQuery { + if cq == nil { + return nil + } return &CardQuery{ config: cq.config, limit: cq.limit, @@ -280,6 +283,8 @@ func (cq *CardQuery) Clone() *CardQuery { order: append([]OrderFunc{}, cq.order...), unique: append([]string{}, cq.unique...), predicates: append([]predicate.Card{}, cq.predicates...), + withOwner: cq.withOwner.Clone(), + withSpec: cq.withSpec.Clone(), // clone intermediate query. sql: cq.sql.Clone(), path: cq.path, diff --git a/entc/integration/ent/comment_query.go b/entc/integration/ent/comment_query.go index b4a811cbf..154135668 100644 --- a/entc/integration/ent/comment_query.go +++ b/entc/integration/ent/comment_query.go @@ -222,6 +222,9 @@ func (cq *CommentQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CommentQuery) Clone() *CommentQuery { + if cq == nil { + return nil + } return &CommentQuery{ config: cq.config, limit: cq.limit, diff --git a/entc/integration/ent/fieldtype_query.go b/entc/integration/ent/fieldtype_query.go index d07d5bb3f..92f72129f 100644 --- a/entc/integration/ent/fieldtype_query.go +++ b/entc/integration/ent/fieldtype_query.go @@ -223,6 +223,9 @@ func (ftq *FieldTypeQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (ftq *FieldTypeQuery) Clone() *FieldTypeQuery { + if ftq == nil { + return nil + } return &FieldTypeQuery{ config: ftq.config, limit: ftq.limit, diff --git a/entc/integration/ent/file_query.go b/entc/integration/ent/file_query.go index aa1aaa375..caa9b76f9 100644 --- a/entc/integration/ent/file_query.go +++ b/entc/integration/ent/file_query.go @@ -297,6 +297,9 @@ func (fq *FileQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (fq *FileQuery) Clone() *FileQuery { + if fq == nil { + return nil + } return &FileQuery{ config: fq.config, limit: fq.limit, @@ -304,6 +307,9 @@ func (fq *FileQuery) Clone() *FileQuery { order: append([]OrderFunc{}, fq.order...), unique: append([]string{}, fq.unique...), predicates: append([]predicate.File{}, fq.predicates...), + withOwner: fq.withOwner.Clone(), + withType: fq.withType.Clone(), + withField: fq.withField.Clone(), // clone intermediate query. sql: fq.sql.Clone(), path: fq.path, diff --git a/entc/integration/ent/filetype_query.go b/entc/integration/ent/filetype_query.go index 6b426b14c..ca03b39b8 100644 --- a/entc/integration/ent/filetype_query.go +++ b/entc/integration/ent/filetype_query.go @@ -248,6 +248,9 @@ func (ftq *FileTypeQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (ftq *FileTypeQuery) Clone() *FileTypeQuery { + if ftq == nil { + return nil + } return &FileTypeQuery{ config: ftq.config, limit: ftq.limit, @@ -255,6 +258,7 @@ func (ftq *FileTypeQuery) Clone() *FileTypeQuery { order: append([]OrderFunc{}, ftq.order...), unique: append([]string{}, ftq.unique...), predicates: append([]predicate.FileType{}, ftq.predicates...), + withFiles: ftq.withFiles.Clone(), // clone intermediate query. sql: ftq.sql.Clone(), path: ftq.path, diff --git a/entc/integration/ent/goods_query.go b/entc/integration/ent/goods_query.go index 5dc0c578d..ebd16e82c 100644 --- a/entc/integration/ent/goods_query.go +++ b/entc/integration/ent/goods_query.go @@ -222,6 +222,9 @@ func (gq *GoodsQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GoodsQuery) Clone() *GoodsQuery { + if gq == nil { + return nil + } return &GoodsQuery{ config: gq.config, limit: gq.limit, diff --git a/entc/integration/ent/group_query.go b/entc/integration/ent/group_query.go index d436bb986..68953bc84 100644 --- a/entc/integration/ent/group_query.go +++ b/entc/integration/ent/group_query.go @@ -320,13 +320,20 @@ func (gq *GroupQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GroupQuery) Clone() *GroupQuery { + if gq == nil { + return nil + } return &GroupQuery{ - config: gq.config, - limit: gq.limit, - offset: gq.offset, - order: append([]OrderFunc{}, gq.order...), - unique: append([]string{}, gq.unique...), - predicates: append([]predicate.Group{}, gq.predicates...), + config: gq.config, + limit: gq.limit, + offset: gq.offset, + order: append([]OrderFunc{}, gq.order...), + unique: append([]string{}, gq.unique...), + predicates: append([]predicate.Group{}, gq.predicates...), + withFiles: gq.withFiles.Clone(), + withBlocked: gq.withBlocked.Clone(), + withUsers: gq.withUsers.Clone(), + withInfo: gq.withInfo.Clone(), // clone intermediate query. sql: gq.sql.Clone(), path: gq.path, diff --git a/entc/integration/ent/groupinfo_query.go b/entc/integration/ent/groupinfo_query.go index 71a5dc114..08c6c42ce 100644 --- a/entc/integration/ent/groupinfo_query.go +++ b/entc/integration/ent/groupinfo_query.go @@ -248,6 +248,9 @@ func (giq *GroupInfoQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (giq *GroupInfoQuery) Clone() *GroupInfoQuery { + if giq == nil { + return nil + } return &GroupInfoQuery{ config: giq.config, limit: giq.limit, @@ -255,6 +258,7 @@ func (giq *GroupInfoQuery) Clone() *GroupInfoQuery { order: append([]OrderFunc{}, giq.order...), unique: append([]string{}, giq.unique...), predicates: append([]predicate.GroupInfo{}, giq.predicates...), + withGroups: giq.withGroups.Clone(), // clone intermediate query. sql: giq.sql.Clone(), path: giq.path, diff --git a/entc/integration/ent/item_query.go b/entc/integration/ent/item_query.go index 70949926e..b97315827 100644 --- a/entc/integration/ent/item_query.go +++ b/entc/integration/ent/item_query.go @@ -222,6 +222,9 @@ func (iq *ItemQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (iq *ItemQuery) Clone() *ItemQuery { + if iq == nil { + return nil + } return &ItemQuery{ config: iq.config, limit: iq.limit, diff --git a/entc/integration/ent/node_query.go b/entc/integration/ent/node_query.go index 6e1ee0a72..57c35ed0f 100644 --- a/entc/integration/ent/node_query.go +++ b/entc/integration/ent/node_query.go @@ -271,6 +271,9 @@ func (nq *NodeQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (nq *NodeQuery) Clone() *NodeQuery { + if nq == nil { + return nil + } return &NodeQuery{ config: nq.config, limit: nq.limit, @@ -278,6 +281,8 @@ func (nq *NodeQuery) Clone() *NodeQuery { order: append([]OrderFunc{}, nq.order...), unique: append([]string{}, nq.unique...), predicates: append([]predicate.Node{}, nq.predicates...), + withPrev: nq.withPrev.Clone(), + withNext: nq.withNext.Clone(), // clone intermediate query. sql: nq.sql.Clone(), path: nq.path, diff --git a/entc/integration/ent/pet_query.go b/entc/integration/ent/pet_query.go index 4a17a7d03..cda175a46 100644 --- a/entc/integration/ent/pet_query.go +++ b/entc/integration/ent/pet_query.go @@ -271,6 +271,9 @@ func (pq *PetQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (pq *PetQuery) Clone() *PetQuery { + if pq == nil { + return nil + } return &PetQuery{ config: pq.config, limit: pq.limit, @@ -278,6 +281,8 @@ func (pq *PetQuery) Clone() *PetQuery { order: append([]OrderFunc{}, pq.order...), unique: append([]string{}, pq.unique...), predicates: append([]predicate.Pet{}, pq.predicates...), + withTeam: pq.withTeam.Clone(), + withOwner: pq.withOwner.Clone(), // clone intermediate query. sql: pq.sql.Clone(), path: pq.path, diff --git a/entc/integration/ent/spec_query.go b/entc/integration/ent/spec_query.go index 37fb9a8f1..65423951f 100644 --- a/entc/integration/ent/spec_query.go +++ b/entc/integration/ent/spec_query.go @@ -248,6 +248,9 @@ func (sq *SpecQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (sq *SpecQuery) Clone() *SpecQuery { + if sq == nil { + return nil + } return &SpecQuery{ config: sq.config, limit: sq.limit, @@ -255,6 +258,7 @@ func (sq *SpecQuery) Clone() *SpecQuery { order: append([]OrderFunc{}, sq.order...), unique: append([]string{}, sq.unique...), predicates: append([]predicate.Spec{}, sq.predicates...), + withCard: sq.withCard.Clone(), // clone intermediate query. sql: sq.sql.Clone(), path: sq.path, diff --git a/entc/integration/ent/task_query.go b/entc/integration/ent/task_query.go index d0b06ba91..9cc62a9cd 100644 --- a/entc/integration/ent/task_query.go +++ b/entc/integration/ent/task_query.go @@ -222,6 +222,9 @@ func (tq *TaskQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (tq *TaskQuery) Clone() *TaskQuery { + if tq == nil { + return nil + } return &TaskQuery{ config: tq.config, limit: tq.limit, diff --git a/entc/integration/ent/user_query.go b/entc/integration/ent/user_query.go index de5656809..114728829 100644 --- a/entc/integration/ent/user_query.go +++ b/entc/integration/ent/user_query.go @@ -482,13 +482,27 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withCard: uq.withCard.Clone(), + withPets: uq.withPets.Clone(), + withFiles: uq.withFiles.Clone(), + withGroups: uq.withGroups.Clone(), + withFriends: uq.withFriends.Clone(), + withFollowers: uq.withFollowers.Clone(), + withFollowing: uq.withFollowing.Clone(), + withTeam: uq.withTeam.Clone(), + withSpouse: uq.withSpouse.Clone(), + withChildren: uq.withChildren.Clone(), + withParent: uq.withParent.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/entc/integration/gremlin/ent/card_query.go b/entc/integration/gremlin/ent/card_query.go index bd79a0e89..562fa93bb 100644 --- a/entc/integration/gremlin/ent/card_query.go +++ b/entc/integration/gremlin/ent/card_query.go @@ -256,6 +256,9 @@ func (cq *CardQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CardQuery) Clone() *CardQuery { + if cq == nil { + return nil + } return &CardQuery{ config: cq.config, limit: cq.limit, @@ -263,6 +266,8 @@ func (cq *CardQuery) Clone() *CardQuery { order: append([]OrderFunc{}, cq.order...), unique: append([]string{}, cq.unique...), predicates: append([]predicate.Card{}, cq.predicates...), + withOwner: cq.withOwner.Clone(), + withSpec: cq.withSpec.Clone(), // clone intermediate query. gremlin: cq.gremlin.Clone(), path: cq.path, diff --git a/entc/integration/gremlin/ent/comment_query.go b/entc/integration/gremlin/ent/comment_query.go index 1845d794d..3759f9162 100644 --- a/entc/integration/gremlin/ent/comment_query.go +++ b/entc/integration/gremlin/ent/comment_query.go @@ -223,6 +223,9 @@ func (cq *CommentQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CommentQuery) Clone() *CommentQuery { + if cq == nil { + return nil + } return &CommentQuery{ config: cq.config, limit: cq.limit, diff --git a/entc/integration/gremlin/ent/fieldtype_query.go b/entc/integration/gremlin/ent/fieldtype_query.go index ca6e60c00..73a08eb8e 100644 --- a/entc/integration/gremlin/ent/fieldtype_query.go +++ b/entc/integration/gremlin/ent/fieldtype_query.go @@ -223,6 +223,9 @@ func (ftq *FieldTypeQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (ftq *FieldTypeQuery) Clone() *FieldTypeQuery { + if ftq == nil { + return nil + } return &FieldTypeQuery{ config: ftq.config, limit: ftq.limit, diff --git a/entc/integration/gremlin/ent/file_query.go b/entc/integration/gremlin/ent/file_query.go index 785ff970d..4a64cd031 100644 --- a/entc/integration/gremlin/ent/file_query.go +++ b/entc/integration/gremlin/ent/file_query.go @@ -271,6 +271,9 @@ func (fq *FileQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (fq *FileQuery) Clone() *FileQuery { + if fq == nil { + return nil + } return &FileQuery{ config: fq.config, limit: fq.limit, @@ -278,6 +281,9 @@ func (fq *FileQuery) Clone() *FileQuery { order: append([]OrderFunc{}, fq.order...), unique: append([]string{}, fq.unique...), predicates: append([]predicate.File{}, fq.predicates...), + withOwner: fq.withOwner.Clone(), + withType: fq.withType.Clone(), + withField: fq.withField.Clone(), // clone intermediate query. gremlin: fq.gremlin.Clone(), path: fq.path, diff --git a/entc/integration/gremlin/ent/filetype_query.go b/entc/integration/gremlin/ent/filetype_query.go index 962f26367..c6e59ca57 100644 --- a/entc/integration/gremlin/ent/filetype_query.go +++ b/entc/integration/gremlin/ent/filetype_query.go @@ -239,6 +239,9 @@ func (ftq *FileTypeQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (ftq *FileTypeQuery) Clone() *FileTypeQuery { + if ftq == nil { + return nil + } return &FileTypeQuery{ config: ftq.config, limit: ftq.limit, @@ -246,6 +249,7 @@ func (ftq *FileTypeQuery) Clone() *FileTypeQuery { order: append([]OrderFunc{}, ftq.order...), unique: append([]string{}, ftq.unique...), predicates: append([]predicate.FileType{}, ftq.predicates...), + withFiles: ftq.withFiles.Clone(), // clone intermediate query. gremlin: ftq.gremlin.Clone(), path: ftq.path, diff --git a/entc/integration/gremlin/ent/goods_query.go b/entc/integration/gremlin/ent/goods_query.go index 5dbc17de8..788ec78e6 100644 --- a/entc/integration/gremlin/ent/goods_query.go +++ b/entc/integration/gremlin/ent/goods_query.go @@ -223,6 +223,9 @@ func (gq *GoodsQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GoodsQuery) Clone() *GoodsQuery { + if gq == nil { + return nil + } return &GoodsQuery{ config: gq.config, limit: gq.limit, diff --git a/entc/integration/gremlin/ent/group_query.go b/entc/integration/gremlin/ent/group_query.go index d3f991af6..9233f3bd6 100644 --- a/entc/integration/gremlin/ent/group_query.go +++ b/entc/integration/gremlin/ent/group_query.go @@ -285,13 +285,20 @@ func (gq *GroupQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GroupQuery) Clone() *GroupQuery { + if gq == nil { + return nil + } return &GroupQuery{ - config: gq.config, - limit: gq.limit, - offset: gq.offset, - order: append([]OrderFunc{}, gq.order...), - unique: append([]string{}, gq.unique...), - predicates: append([]predicate.Group{}, gq.predicates...), + config: gq.config, + limit: gq.limit, + offset: gq.offset, + order: append([]OrderFunc{}, gq.order...), + unique: append([]string{}, gq.unique...), + predicates: append([]predicate.Group{}, gq.predicates...), + withFiles: gq.withFiles.Clone(), + withBlocked: gq.withBlocked.Clone(), + withUsers: gq.withUsers.Clone(), + withInfo: gq.withInfo.Clone(), // clone intermediate query. gremlin: gq.gremlin.Clone(), path: gq.path, diff --git a/entc/integration/gremlin/ent/groupinfo_query.go b/entc/integration/gremlin/ent/groupinfo_query.go index 96380e76d..81dc288b4 100644 --- a/entc/integration/gremlin/ent/groupinfo_query.go +++ b/entc/integration/gremlin/ent/groupinfo_query.go @@ -240,6 +240,9 @@ func (giq *GroupInfoQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (giq *GroupInfoQuery) Clone() *GroupInfoQuery { + if giq == nil { + return nil + } return &GroupInfoQuery{ config: giq.config, limit: giq.limit, @@ -247,6 +250,7 @@ func (giq *GroupInfoQuery) Clone() *GroupInfoQuery { order: append([]OrderFunc{}, giq.order...), unique: append([]string{}, giq.unique...), predicates: append([]predicate.GroupInfo{}, giq.predicates...), + withGroups: giq.withGroups.Clone(), // clone intermediate query. gremlin: giq.gremlin.Clone(), path: giq.path, diff --git a/entc/integration/gremlin/ent/item_query.go b/entc/integration/gremlin/ent/item_query.go index 6ee65a724..d967d11b8 100644 --- a/entc/integration/gremlin/ent/item_query.go +++ b/entc/integration/gremlin/ent/item_query.go @@ -223,6 +223,9 @@ func (iq *ItemQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (iq *ItemQuery) Clone() *ItemQuery { + if iq == nil { + return nil + } return &ItemQuery{ config: iq.config, limit: iq.limit, diff --git a/entc/integration/gremlin/ent/node_query.go b/entc/integration/gremlin/ent/node_query.go index de5840592..a980d8da9 100644 --- a/entc/integration/gremlin/ent/node_query.go +++ b/entc/integration/gremlin/ent/node_query.go @@ -254,6 +254,9 @@ func (nq *NodeQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (nq *NodeQuery) Clone() *NodeQuery { + if nq == nil { + return nil + } return &NodeQuery{ config: nq.config, limit: nq.limit, @@ -261,6 +264,8 @@ func (nq *NodeQuery) Clone() *NodeQuery { order: append([]OrderFunc{}, nq.order...), unique: append([]string{}, nq.unique...), predicates: append([]predicate.Node{}, nq.predicates...), + withPrev: nq.withPrev.Clone(), + withNext: nq.withNext.Clone(), // clone intermediate query. gremlin: nq.gremlin.Clone(), path: nq.path, diff --git a/entc/integration/gremlin/ent/pet_query.go b/entc/integration/gremlin/ent/pet_query.go index 3eea65182..d52fc3c2f 100644 --- a/entc/integration/gremlin/ent/pet_query.go +++ b/entc/integration/gremlin/ent/pet_query.go @@ -255,6 +255,9 @@ func (pq *PetQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (pq *PetQuery) Clone() *PetQuery { + if pq == nil { + return nil + } return &PetQuery{ config: pq.config, limit: pq.limit, @@ -262,6 +265,8 @@ func (pq *PetQuery) Clone() *PetQuery { order: append([]OrderFunc{}, pq.order...), unique: append([]string{}, pq.unique...), predicates: append([]predicate.Pet{}, pq.predicates...), + withTeam: pq.withTeam.Clone(), + withOwner: pq.withOwner.Clone(), // clone intermediate query. gremlin: pq.gremlin.Clone(), path: pq.path, diff --git a/entc/integration/gremlin/ent/spec_query.go b/entc/integration/gremlin/ent/spec_query.go index 448286972..78d7a9bf6 100644 --- a/entc/integration/gremlin/ent/spec_query.go +++ b/entc/integration/gremlin/ent/spec_query.go @@ -239,6 +239,9 @@ func (sq *SpecQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (sq *SpecQuery) Clone() *SpecQuery { + if sq == nil { + return nil + } return &SpecQuery{ config: sq.config, limit: sq.limit, @@ -246,6 +249,7 @@ func (sq *SpecQuery) Clone() *SpecQuery { order: append([]OrderFunc{}, sq.order...), unique: append([]string{}, sq.unique...), predicates: append([]predicate.Spec{}, sq.predicates...), + withCard: sq.withCard.Clone(), // clone intermediate query. gremlin: sq.gremlin.Clone(), path: sq.path, diff --git a/entc/integration/gremlin/ent/task_query.go b/entc/integration/gremlin/ent/task_query.go index 91e642d10..6b21e056d 100644 --- a/entc/integration/gremlin/ent/task_query.go +++ b/entc/integration/gremlin/ent/task_query.go @@ -223,6 +223,9 @@ func (tq *TaskQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (tq *TaskQuery) Clone() *TaskQuery { + if tq == nil { + return nil + } return &TaskQuery{ config: tq.config, limit: tq.limit, diff --git a/entc/integration/gremlin/ent/user_query.go b/entc/integration/gremlin/ent/user_query.go index 9193929f7..ff6290fc0 100644 --- a/entc/integration/gremlin/ent/user_query.go +++ b/entc/integration/gremlin/ent/user_query.go @@ -389,13 +389,27 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withCard: uq.withCard.Clone(), + withPets: uq.withPets.Clone(), + withFiles: uq.withFiles.Clone(), + withGroups: uq.withGroups.Clone(), + withFriends: uq.withFriends.Clone(), + withFollowers: uq.withFollowers.Clone(), + withFollowing: uq.withFollowing.Clone(), + withTeam: uq.withTeam.Clone(), + withSpouse: uq.withSpouse.Clone(), + withChildren: uq.withChildren.Clone(), + withParent: uq.withParent.Clone(), // clone intermediate query. gremlin: uq.gremlin.Clone(), path: uq.path, diff --git a/entc/integration/hooks/ent/card_query.go b/entc/integration/hooks/ent/card_query.go index 8494d3033..2950e7a6d 100644 --- a/entc/integration/hooks/ent/card_query.go +++ b/entc/integration/hooks/ent/card_query.go @@ -248,6 +248,9 @@ func (cq *CardQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CardQuery) Clone() *CardQuery { + if cq == nil { + return nil + } return &CardQuery{ config: cq.config, limit: cq.limit, @@ -255,6 +258,7 @@ func (cq *CardQuery) Clone() *CardQuery { order: append([]OrderFunc{}, cq.order...), unique: append([]string{}, cq.unique...), predicates: append([]predicate.Card{}, cq.predicates...), + withOwner: cq.withOwner.Clone(), // clone intermediate query. sql: cq.sql.Clone(), path: cq.path, diff --git a/entc/integration/hooks/ent/user_query.go b/entc/integration/hooks/ent/user_query.go index 6a2881084..c99f2f9bf 100644 --- a/entc/integration/hooks/ent/user_query.go +++ b/entc/integration/hooks/ent/user_query.go @@ -295,13 +295,19 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withCards: uq.withCards.Clone(), + withFriends: uq.withFriends.Clone(), + withBestFriend: uq.withBestFriend.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/entc/integration/idtype/ent/user_query.go b/entc/integration/idtype/ent/user_query.go index 208ae2459..e172777b7 100644 --- a/entc/integration/idtype/ent/user_query.go +++ b/entc/integration/idtype/ent/user_query.go @@ -294,13 +294,19 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withSpouse: uq.withSpouse.Clone(), + withFollowers: uq.withFollowers.Clone(), + withFollowing: uq.withFollowing.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/entc/integration/json/ent/user_query.go b/entc/integration/json/ent/user_query.go index 6e0865b4e..d3078d9c1 100644 --- a/entc/integration/json/ent/user_query.go +++ b/entc/integration/json/ent/user_query.go @@ -222,6 +222,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, diff --git a/entc/integration/migrate/entv1/car_query.go b/entc/integration/migrate/entv1/car_query.go index 874610e7c..8be5492ee 100644 --- a/entc/integration/migrate/entv1/car_query.go +++ b/entc/integration/migrate/entv1/car_query.go @@ -248,6 +248,9 @@ func (cq *CarQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CarQuery) Clone() *CarQuery { + if cq == nil { + return nil + } return &CarQuery{ config: cq.config, limit: cq.limit, @@ -255,6 +258,7 @@ func (cq *CarQuery) Clone() *CarQuery { order: append([]OrderFunc{}, cq.order...), unique: append([]string{}, cq.unique...), predicates: append([]predicate.Car{}, cq.predicates...), + withOwner: cq.withOwner.Clone(), // clone intermediate query. sql: cq.sql.Clone(), path: cq.path, diff --git a/entc/integration/migrate/entv1/user_query.go b/entc/integration/migrate/entv1/user_query.go index 1b890833a..72d81553d 100644 --- a/entc/integration/migrate/entv1/user_query.go +++ b/entc/integration/migrate/entv1/user_query.go @@ -318,13 +318,20 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withParent: uq.withParent.Clone(), + withChildren: uq.withChildren.Clone(), + withSpouse: uq.withSpouse.Clone(), + withCar: uq.withCar.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/entc/integration/migrate/entv2/car_query.go b/entc/integration/migrate/entv2/car_query.go index 07f747f1e..5be3a7661 100644 --- a/entc/integration/migrate/entv2/car_query.go +++ b/entc/integration/migrate/entv2/car_query.go @@ -248,6 +248,9 @@ func (cq *CarQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CarQuery) Clone() *CarQuery { + if cq == nil { + return nil + } return &CarQuery{ config: cq.config, limit: cq.limit, @@ -255,6 +258,7 @@ func (cq *CarQuery) Clone() *CarQuery { order: append([]OrderFunc{}, cq.order...), unique: append([]string{}, cq.unique...), predicates: append([]predicate.Car{}, cq.predicates...), + withOwner: cq.withOwner.Clone(), // clone intermediate query. sql: cq.sql.Clone(), path: cq.path, diff --git a/entc/integration/migrate/entv2/group_query.go b/entc/integration/migrate/entv2/group_query.go index 439880765..0529eb836 100644 --- a/entc/integration/migrate/entv2/group_query.go +++ b/entc/integration/migrate/entv2/group_query.go @@ -222,6 +222,9 @@ func (gq *GroupQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GroupQuery) Clone() *GroupQuery { + if gq == nil { + return nil + } return &GroupQuery{ config: gq.config, limit: gq.limit, diff --git a/entc/integration/migrate/entv2/media_query.go b/entc/integration/migrate/entv2/media_query.go index f08237a3a..65d01e1f1 100644 --- a/entc/integration/migrate/entv2/media_query.go +++ b/entc/integration/migrate/entv2/media_query.go @@ -222,6 +222,9 @@ func (mq *MediaQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (mq *MediaQuery) Clone() *MediaQuery { + if mq == nil { + return nil + } return &MediaQuery{ config: mq.config, limit: mq.limit, diff --git a/entc/integration/migrate/entv2/pet_query.go b/entc/integration/migrate/entv2/pet_query.go index d6e3dc3f5..a2237e5ed 100644 --- a/entc/integration/migrate/entv2/pet_query.go +++ b/entc/integration/migrate/entv2/pet_query.go @@ -248,6 +248,9 @@ func (pq *PetQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (pq *PetQuery) Clone() *PetQuery { + if pq == nil { + return nil + } return &PetQuery{ config: pq.config, limit: pq.limit, @@ -255,6 +258,7 @@ func (pq *PetQuery) Clone() *PetQuery { order: append([]OrderFunc{}, pq.order...), unique: append([]string{}, pq.unique...), predicates: append([]predicate.Pet{}, pq.predicates...), + withOwner: pq.withOwner.Clone(), // clone intermediate query. sql: pq.sql.Clone(), path: pq.path, diff --git a/entc/integration/migrate/entv2/user_query.go b/entc/integration/migrate/entv2/user_query.go index 21717fcac..7ebda6ed1 100644 --- a/entc/integration/migrate/entv2/user_query.go +++ b/entc/integration/migrate/entv2/user_query.go @@ -295,13 +295,19 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withCar: uq.withCar.Clone(), + withPets: uq.withPets.Clone(), + withFriends: uq.withFriends.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/entc/integration/privacy/ent/task_query.go b/entc/integration/privacy/ent/task_query.go index cd6607b4f..3669dbe36 100644 --- a/entc/integration/privacy/ent/task_query.go +++ b/entc/integration/privacy/ent/task_query.go @@ -273,6 +273,9 @@ func (tq *TaskQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (tq *TaskQuery) Clone() *TaskQuery { + if tq == nil { + return nil + } return &TaskQuery{ config: tq.config, limit: tq.limit, @@ -280,6 +283,8 @@ func (tq *TaskQuery) Clone() *TaskQuery { order: append([]OrderFunc{}, tq.order...), unique: append([]string{}, tq.unique...), predicates: append([]predicate.Task{}, tq.predicates...), + withTeams: tq.withTeams.Clone(), + withOwner: tq.withOwner.Clone(), // clone intermediate query. sql: tq.sql.Clone(), path: tq.path, diff --git a/entc/integration/privacy/ent/team_query.go b/entc/integration/privacy/ent/team_query.go index b38b9b572..c50992955 100644 --- a/entc/integration/privacy/ent/team_query.go +++ b/entc/integration/privacy/ent/team_query.go @@ -272,6 +272,9 @@ func (tq *TeamQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (tq *TeamQuery) Clone() *TeamQuery { + if tq == nil { + return nil + } return &TeamQuery{ config: tq.config, limit: tq.limit, @@ -279,6 +282,8 @@ func (tq *TeamQuery) Clone() *TeamQuery { order: append([]OrderFunc{}, tq.order...), unique: append([]string{}, tq.unique...), predicates: append([]predicate.Team{}, tq.predicates...), + withTasks: tq.withTasks.Clone(), + withUsers: tq.withUsers.Clone(), // clone intermediate query. sql: tq.sql.Clone(), path: tq.path, diff --git a/entc/integration/privacy/ent/user_query.go b/entc/integration/privacy/ent/user_query.go index 5e1b6e216..bab6ccd85 100644 --- a/entc/integration/privacy/ent/user_query.go +++ b/entc/integration/privacy/ent/user_query.go @@ -272,6 +272,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, @@ -279,6 +282,8 @@ func (uq *UserQuery) Clone() *UserQuery { order: append([]OrderFunc{}, uq.order...), unique: append([]string{}, uq.unique...), predicates: append([]predicate.User{}, uq.predicates...), + withTeams: uq.withTeams.Clone(), + withTasks: uq.withTasks.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/entc/integration/template/ent/group_query.go b/entc/integration/template/ent/group_query.go index ec9d1f069..00d362762 100644 --- a/entc/integration/template/ent/group_query.go +++ b/entc/integration/template/ent/group_query.go @@ -222,6 +222,9 @@ func (gq *GroupQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GroupQuery) Clone() *GroupQuery { + if gq == nil { + return nil + } return &GroupQuery{ config: gq.config, limit: gq.limit, diff --git a/entc/integration/template/ent/pet_query.go b/entc/integration/template/ent/pet_query.go index d43313aac..fa66d26ab 100644 --- a/entc/integration/template/ent/pet_query.go +++ b/entc/integration/template/ent/pet_query.go @@ -248,6 +248,9 @@ func (pq *PetQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (pq *PetQuery) Clone() *PetQuery { + if pq == nil { + return nil + } return &PetQuery{ config: pq.config, limit: pq.limit, @@ -255,6 +258,7 @@ func (pq *PetQuery) Clone() *PetQuery { order: append([]OrderFunc{}, pq.order...), unique: append([]string{}, pq.unique...), predicates: append([]predicate.Pet{}, pq.predicates...), + withOwner: pq.withOwner.Clone(), // clone intermediate query. sql: pq.sql.Clone(), path: pq.path, diff --git a/entc/integration/template/ent/user_query.go b/entc/integration/template/ent/user_query.go index 6bf713a44..e5a9fee87 100644 --- a/entc/integration/template/ent/user_query.go +++ b/entc/integration/template/ent/user_query.go @@ -271,13 +271,18 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withPets: uq.withPets.Clone(), + withFriends: uq.withFriends.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/examples/edgeindex/ent/city_query.go b/examples/edgeindex/ent/city_query.go index 0cea456e1..36ff9b1b2 100644 --- a/examples/edgeindex/ent/city_query.go +++ b/examples/edgeindex/ent/city_query.go @@ -248,13 +248,17 @@ func (cq *CityQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CityQuery) Clone() *CityQuery { + if cq == nil { + return nil + } return &CityQuery{ - config: cq.config, - limit: cq.limit, - offset: cq.offset, - order: append([]OrderFunc{}, cq.order...), - unique: append([]string{}, cq.unique...), - predicates: append([]predicate.City{}, cq.predicates...), + config: cq.config, + limit: cq.limit, + offset: cq.offset, + order: append([]OrderFunc{}, cq.order...), + unique: append([]string{}, cq.unique...), + predicates: append([]predicate.City{}, cq.predicates...), + withStreets: cq.withStreets.Clone(), // clone intermediate query. sql: cq.sql.Clone(), path: cq.path, diff --git a/examples/edgeindex/ent/street_query.go b/examples/edgeindex/ent/street_query.go index fd0a0eb81..97f945e1d 100644 --- a/examples/edgeindex/ent/street_query.go +++ b/examples/edgeindex/ent/street_query.go @@ -248,6 +248,9 @@ func (sq *StreetQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (sq *StreetQuery) Clone() *StreetQuery { + if sq == nil { + return nil + } return &StreetQuery{ config: sq.config, limit: sq.limit, @@ -255,6 +258,7 @@ func (sq *StreetQuery) Clone() *StreetQuery { order: append([]OrderFunc{}, sq.order...), unique: append([]string{}, sq.unique...), predicates: append([]predicate.Street{}, sq.predicates...), + withCity: sq.withCity.Clone(), // clone intermediate query. sql: sq.sql.Clone(), path: sq.path, diff --git a/examples/entcpkg/ent/user_query.go b/examples/entcpkg/ent/user_query.go index 78962075b..7a9c9941e 100644 --- a/examples/entcpkg/ent/user_query.go +++ b/examples/entcpkg/ent/user_query.go @@ -222,6 +222,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, diff --git a/examples/m2m2types/ent/group_query.go b/examples/m2m2types/ent/group_query.go index bd9ee01ba..fc121a45a 100644 --- a/examples/m2m2types/ent/group_query.go +++ b/examples/m2m2types/ent/group_query.go @@ -248,6 +248,9 @@ func (gq *GroupQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GroupQuery) Clone() *GroupQuery { + if gq == nil { + return nil + } return &GroupQuery{ config: gq.config, limit: gq.limit, @@ -255,6 +258,7 @@ func (gq *GroupQuery) Clone() *GroupQuery { order: append([]OrderFunc{}, gq.order...), unique: append([]string{}, gq.unique...), predicates: append([]predicate.Group{}, gq.predicates...), + withUsers: gq.withUsers.Clone(), // clone intermediate query. sql: gq.sql.Clone(), path: gq.path, diff --git a/examples/m2m2types/ent/user_query.go b/examples/m2m2types/ent/user_query.go index 2cc535b36..58bb917b2 100644 --- a/examples/m2m2types/ent/user_query.go +++ b/examples/m2m2types/ent/user_query.go @@ -248,6 +248,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, @@ -255,6 +258,7 @@ func (uq *UserQuery) Clone() *UserQuery { order: append([]OrderFunc{}, uq.order...), unique: append([]string{}, uq.unique...), predicates: append([]predicate.User{}, uq.predicates...), + withGroups: uq.withGroups.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/examples/m2mbidi/ent/user_query.go b/examples/m2mbidi/ent/user_query.go index 6c578efc6..a62b63c82 100644 --- a/examples/m2mbidi/ent/user_query.go +++ b/examples/m2mbidi/ent/user_query.go @@ -247,13 +247,17 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withFriends: uq.withFriends.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/examples/m2mrecur/ent/user_query.go b/examples/m2mrecur/ent/user_query.go index a406c4abe..cad371470 100644 --- a/examples/m2mrecur/ent/user_query.go +++ b/examples/m2mrecur/ent/user_query.go @@ -270,13 +270,18 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withFollowers: uq.withFollowers.Clone(), + withFollowing: uq.withFollowing.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/examples/o2m2types/ent/pet_query.go b/examples/o2m2types/ent/pet_query.go index 1859a065e..5110ccee3 100644 --- a/examples/o2m2types/ent/pet_query.go +++ b/examples/o2m2types/ent/pet_query.go @@ -248,6 +248,9 @@ func (pq *PetQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (pq *PetQuery) Clone() *PetQuery { + if pq == nil { + return nil + } return &PetQuery{ config: pq.config, limit: pq.limit, @@ -255,6 +258,7 @@ func (pq *PetQuery) Clone() *PetQuery { order: append([]OrderFunc{}, pq.order...), unique: append([]string{}, pq.unique...), predicates: append([]predicate.Pet{}, pq.predicates...), + withOwner: pq.withOwner.Clone(), // clone intermediate query. sql: pq.sql.Clone(), path: pq.path, diff --git a/examples/o2m2types/ent/user_query.go b/examples/o2m2types/ent/user_query.go index 18de9fb3c..be70b64d5 100644 --- a/examples/o2m2types/ent/user_query.go +++ b/examples/o2m2types/ent/user_query.go @@ -248,6 +248,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, @@ -255,6 +258,7 @@ func (uq *UserQuery) Clone() *UserQuery { order: append([]OrderFunc{}, uq.order...), unique: append([]string{}, uq.unique...), predicates: append([]predicate.User{}, uq.predicates...), + withPets: uq.withPets.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/examples/o2mrecur/ent/node_query.go b/examples/o2mrecur/ent/node_query.go index 0546a1805..38c7436cc 100644 --- a/examples/o2mrecur/ent/node_query.go +++ b/examples/o2mrecur/ent/node_query.go @@ -271,13 +271,18 @@ func (nq *NodeQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (nq *NodeQuery) Clone() *NodeQuery { + if nq == nil { + return nil + } return &NodeQuery{ - config: nq.config, - limit: nq.limit, - offset: nq.offset, - order: append([]OrderFunc{}, nq.order...), - unique: append([]string{}, nq.unique...), - predicates: append([]predicate.Node{}, nq.predicates...), + config: nq.config, + limit: nq.limit, + offset: nq.offset, + order: append([]OrderFunc{}, nq.order...), + unique: append([]string{}, nq.unique...), + predicates: append([]predicate.Node{}, nq.predicates...), + withParent: nq.withParent.Clone(), + withChildren: nq.withChildren.Clone(), // clone intermediate query. sql: nq.sql.Clone(), path: nq.path, diff --git a/examples/o2o2types/ent/card_query.go b/examples/o2o2types/ent/card_query.go index 6d0965414..2af51fb07 100644 --- a/examples/o2o2types/ent/card_query.go +++ b/examples/o2o2types/ent/card_query.go @@ -248,6 +248,9 @@ func (cq *CardQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CardQuery) Clone() *CardQuery { + if cq == nil { + return nil + } return &CardQuery{ config: cq.config, limit: cq.limit, @@ -255,6 +258,7 @@ func (cq *CardQuery) Clone() *CardQuery { order: append([]OrderFunc{}, cq.order...), unique: append([]string{}, cq.unique...), predicates: append([]predicate.Card{}, cq.predicates...), + withOwner: cq.withOwner.Clone(), // clone intermediate query. sql: cq.sql.Clone(), path: cq.path, diff --git a/examples/o2o2types/ent/user_query.go b/examples/o2o2types/ent/user_query.go index 78937ddce..ff4f68517 100644 --- a/examples/o2o2types/ent/user_query.go +++ b/examples/o2o2types/ent/user_query.go @@ -248,6 +248,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, @@ -255,6 +258,7 @@ func (uq *UserQuery) Clone() *UserQuery { order: append([]OrderFunc{}, uq.order...), unique: append([]string{}, uq.unique...), predicates: append([]predicate.User{}, uq.predicates...), + withCard: uq.withCard.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/examples/o2obidi/ent/user_query.go b/examples/o2obidi/ent/user_query.go index 9b164775b..2de48939f 100644 --- a/examples/o2obidi/ent/user_query.go +++ b/examples/o2obidi/ent/user_query.go @@ -247,6 +247,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, @@ -254,6 +257,7 @@ func (uq *UserQuery) Clone() *UserQuery { order: append([]OrderFunc{}, uq.order...), unique: append([]string{}, uq.unique...), predicates: append([]predicate.User{}, uq.predicates...), + withSpouse: uq.withSpouse.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/examples/o2orecur/ent/node_query.go b/examples/o2orecur/ent/node_query.go index da5e35bc5..e34ef9ecf 100644 --- a/examples/o2orecur/ent/node_query.go +++ b/examples/o2orecur/ent/node_query.go @@ -271,6 +271,9 @@ func (nq *NodeQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (nq *NodeQuery) Clone() *NodeQuery { + if nq == nil { + return nil + } return &NodeQuery{ config: nq.config, limit: nq.limit, @@ -278,6 +281,8 @@ func (nq *NodeQuery) Clone() *NodeQuery { order: append([]OrderFunc{}, nq.order...), unique: append([]string{}, nq.unique...), predicates: append([]predicate.Node{}, nq.predicates...), + withPrev: nq.withPrev.Clone(), + withNext: nq.withNext.Clone(), // clone intermediate query. sql: nq.sql.Clone(), path: nq.path, diff --git a/examples/privacyadmin/ent/user_query.go b/examples/privacyadmin/ent/user_query.go index 574d9ee30..e3651579c 100644 --- a/examples/privacyadmin/ent/user_query.go +++ b/examples/privacyadmin/ent/user_query.go @@ -222,6 +222,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, diff --git a/examples/privacytenant/ent/group_query.go b/examples/privacytenant/ent/group_query.go index 18cf2ea28..701597e09 100644 --- a/examples/privacytenant/ent/group_query.go +++ b/examples/privacytenant/ent/group_query.go @@ -273,6 +273,9 @@ func (gq *GroupQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GroupQuery) Clone() *GroupQuery { + if gq == nil { + return nil + } return &GroupQuery{ config: gq.config, limit: gq.limit, @@ -280,6 +283,8 @@ func (gq *GroupQuery) Clone() *GroupQuery { order: append([]OrderFunc{}, gq.order...), unique: append([]string{}, gq.unique...), predicates: append([]predicate.Group{}, gq.predicates...), + withTenant: gq.withTenant.Clone(), + withUsers: gq.withUsers.Clone(), // clone intermediate query. sql: gq.sql.Clone(), path: gq.path, diff --git a/examples/privacytenant/ent/tenant_query.go b/examples/privacytenant/ent/tenant_query.go index da5f012c1..ea91381e9 100644 --- a/examples/privacytenant/ent/tenant_query.go +++ b/examples/privacytenant/ent/tenant_query.go @@ -222,6 +222,9 @@ func (tq *TenantQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (tq *TenantQuery) Clone() *TenantQuery { + if tq == nil { + return nil + } return &TenantQuery{ config: tq.config, limit: tq.limit, diff --git a/examples/privacytenant/ent/user_query.go b/examples/privacytenant/ent/user_query.go index 1682e8c92..5259ad4c9 100644 --- a/examples/privacytenant/ent/user_query.go +++ b/examples/privacytenant/ent/user_query.go @@ -273,6 +273,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, @@ -280,6 +283,8 @@ func (uq *UserQuery) Clone() *UserQuery { order: append([]OrderFunc{}, uq.order...), unique: append([]string{}, uq.unique...), predicates: append([]predicate.User{}, uq.predicates...), + withTenant: uq.withTenant.Clone(), + withGroups: uq.withGroups.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/examples/start/ent/car_query.go b/examples/start/ent/car_query.go index f6ea7ae03..135494ffa 100644 --- a/examples/start/ent/car_query.go +++ b/examples/start/ent/car_query.go @@ -248,6 +248,9 @@ func (cq *CarQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (cq *CarQuery) Clone() *CarQuery { + if cq == nil { + return nil + } return &CarQuery{ config: cq.config, limit: cq.limit, @@ -255,6 +258,7 @@ func (cq *CarQuery) Clone() *CarQuery { order: append([]OrderFunc{}, cq.order...), unique: append([]string{}, cq.unique...), predicates: append([]predicate.Car{}, cq.predicates...), + withOwner: cq.withOwner.Clone(), // clone intermediate query. sql: cq.sql.Clone(), path: cq.path, diff --git a/examples/start/ent/group_query.go b/examples/start/ent/group_query.go index c59c85a06..a41e5bab8 100644 --- a/examples/start/ent/group_query.go +++ b/examples/start/ent/group_query.go @@ -248,6 +248,9 @@ func (gq *GroupQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GroupQuery) Clone() *GroupQuery { + if gq == nil { + return nil + } return &GroupQuery{ config: gq.config, limit: gq.limit, @@ -255,6 +258,7 @@ func (gq *GroupQuery) Clone() *GroupQuery { order: append([]OrderFunc{}, gq.order...), unique: append([]string{}, gq.unique...), predicates: append([]predicate.Group{}, gq.predicates...), + withUsers: gq.withUsers.Clone(), // clone intermediate query. sql: gq.sql.Clone(), path: gq.path, diff --git a/examples/start/ent/user_query.go b/examples/start/ent/user_query.go index 2e3855204..0b26477dc 100644 --- a/examples/start/ent/user_query.go +++ b/examples/start/ent/user_query.go @@ -272,6 +272,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ config: uq.config, limit: uq.limit, @@ -279,6 +282,8 @@ func (uq *UserQuery) Clone() *UserQuery { order: append([]OrderFunc{}, uq.order...), unique: append([]string{}, uq.unique...), predicates: append([]predicate.User{}, uq.predicates...), + withCars: uq.withCars.Clone(), + withGroups: uq.withGroups.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path, diff --git a/examples/traversal/ent/group_query.go b/examples/traversal/ent/group_query.go index 7f68ecdaf..5d203633a 100644 --- a/examples/traversal/ent/group_query.go +++ b/examples/traversal/ent/group_query.go @@ -272,6 +272,9 @@ func (gq *GroupQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (gq *GroupQuery) Clone() *GroupQuery { + if gq == nil { + return nil + } return &GroupQuery{ config: gq.config, limit: gq.limit, @@ -279,6 +282,8 @@ func (gq *GroupQuery) Clone() *GroupQuery { order: append([]OrderFunc{}, gq.order...), unique: append([]string{}, gq.unique...), predicates: append([]predicate.Group{}, gq.predicates...), + withUsers: gq.withUsers.Clone(), + withAdmin: gq.withAdmin.Clone(), // clone intermediate query. sql: gq.sql.Clone(), path: gq.path, diff --git a/examples/traversal/ent/pet_query.go b/examples/traversal/ent/pet_query.go index 5e9f3dcca..71b8a2dda 100644 --- a/examples/traversal/ent/pet_query.go +++ b/examples/traversal/ent/pet_query.go @@ -272,13 +272,18 @@ func (pq *PetQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (pq *PetQuery) Clone() *PetQuery { + if pq == nil { + return nil + } return &PetQuery{ - config: pq.config, - limit: pq.limit, - offset: pq.offset, - order: append([]OrderFunc{}, pq.order...), - unique: append([]string{}, pq.unique...), - predicates: append([]predicate.Pet{}, pq.predicates...), + config: pq.config, + limit: pq.limit, + offset: pq.offset, + order: append([]OrderFunc{}, pq.order...), + unique: append([]string{}, pq.unique...), + predicates: append([]predicate.Pet{}, pq.predicates...), + withFriends: pq.withFriends.Clone(), + withOwner: pq.withOwner.Clone(), // clone intermediate query. sql: pq.sql.Clone(), path: pq.path, diff --git a/examples/traversal/ent/user_query.go b/examples/traversal/ent/user_query.go index 9e18d047e..66335ea8f 100644 --- a/examples/traversal/ent/user_query.go +++ b/examples/traversal/ent/user_query.go @@ -318,13 +318,20 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool { // Clone returns a duplicate of the query builder, including all associated steps. It can be // used to prepare common query builders and use them differently after the clone is made. func (uq *UserQuery) Clone() *UserQuery { + if uq == nil { + return nil + } return &UserQuery{ - config: uq.config, - limit: uq.limit, - offset: uq.offset, - order: append([]OrderFunc{}, uq.order...), - unique: append([]string{}, uq.unique...), - predicates: append([]predicate.User{}, uq.predicates...), + config: uq.config, + limit: uq.limit, + offset: uq.offset, + order: append([]OrderFunc{}, uq.order...), + unique: append([]string{}, uq.unique...), + predicates: append([]predicate.User{}, uq.predicates...), + withPets: uq.withPets.Clone(), + withFriends: uq.withFriends.Clone(), + withGroups: uq.withGroups.Clone(), + withManage: uq.withManage.Clone(), // clone intermediate query. sql: uq.sql.Clone(), path: uq.path,