From 109228f0a30b75774bfbe91577ff7ef3b2c63a9d Mon Sep 17 00:00:00 2001 From: Ariel Mashraki <7413593+a8m@users.noreply.github.com> Date: Fri, 26 Feb 2021 22:18:54 +0200 Subject: [PATCH] entc/gen: fix name conflicts in client.tmpl (#1281) --- entc/gen/internal/bindata.go | 4 ++-- entc/gen/template/client.tmpl | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index 2e6730f36..f928450eb 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -291,7 +291,7 @@ func templateBuilderUpdateTmpl() (*asset, error) { return a, nil } -var _templateClientTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x59\x6d\x73\xdb\xb8\xf1\x7f\x2d\x7e\x8a\xfd\x73\x9c\xfc\x49\x8f\x0c\x5e\xef\x5d\xd5\xf1\x8b\x9c\x9d\x5e\x35\x73\x67\xdf\x35\xbe\xb6\x33\x37\x99\x04\x06\x97\x14\x62\x0a\xa0\x41\xc8\x96\x47\xf5\x77\xef\x2c\x00\x3e\x49\xb4\xe3\x4b\xd2\xe9\x1b\x5b\xc4\xc3\xee\x62\xf7\xb7\x4f\xc0\x6e\x97\x1d\x47\x67\xba\x7e\x30\xb2\x5c\x59\xf8\xfe\xbb\x3f\xfd\xf9\xa4\x36\xd8\xa0\xb2\xf0\x57\x2e\xf0\x5a\xeb\x1b\x58\x2a\xc1\xe0\x4d\x55\x81\x5b\xd4\x00\xcd\x9b\x3b\xcc\x59\x74\xb5\x92\x0d\x34\x7a\x63\x04\x82\xd0\x39\x82\x6c\xa0\x92\x02\x55\x83\x39\x6c\x54\x8e\x06\xec\x0a\xe1\x4d\xcd\xc5\x0a\xe1\x7b\xf6\x5d\x3b\x0b\x85\xde\xa8\x3c\x92\xca\xcd\xff\xb4\x3c\x7b\x7b\xf1\xee\x2d\x14\xb2\x42\x08\x63\x46\x6b\x0b\xb9\x34\x28\xac\x36\x0f\xa0\x0b\xb0\x03\x66\xd6\x20\xb2\xe8\x38\x7b\x7c\x8c\xa2\xdd\x0e\x72\x2c\xa4\x42\x88\x45\x25\x51\xd9\x18\xc2\xf0\x51\x7d\x53\xc2\xe2\x14\xae\x79\x83\x70\xc4\xce\xb4\x2a\x64\xc9\x7e\xe1\xe2\x86\x97\x48\x8b\x76\x3b\xb0\xb8\xae\x2b\x6e\x11\xe2\x15\xf2\x1c\x4d\x0c\x47\x6e\xbb\x5c\xd7\xda\x58\x48\xa2\x59\x5c\xe9\x32\x8e\xa2\x59\x4c\x14\x0f\x89\x64\x6b\x59\x1a\x6e\x31\x8e\x66\xbb\x1d\x18\xae\x4a\x84\xa3\x0f\x73\x38\x52\xc4\xfa\x88\x5d\xe8\x1c\x1b\x22\x39\xf3\x14\xd4\x04\x09\x3f\xde\x0f\x38\x5a\x27\x80\x2a\x77\xb2\xcc\x62\x54\xb6\xd4\x4c\xea\x0c\x95\xcd\x72\xc9\x2b\x14\xf6\x80\x61\x10\xd9\x71\x7d\x67\xb5\xe1\x25\xb2\xa5\x1b\x6b\xe0\xa4\x17\x20\x2c\x0b\x5c\x1c\x13\x9a\x4d\xa3\x28\xcb\xe0\xcc\x69\x90\xec\x48\x46\xf0\xfa\x04\xbb\xe2\x16\x56\xba\xca\x1b\xe0\x55\x05\x34\x74\xbd\x91\x55\x8e\xa6\x61\x91\x7d\xa8\xb1\xdd\xd6\x58\xb3\x11\x16\x76\xd1\x4c\xb8\x33\xfa\x63\xc8\x82\x04\xda\xd4\xc4\xf6\x67\xaf\x2c\xaf\x8f\x2c\x83\x77\x62\x85\x6b\xbe\xc7\xaf\xd0\x06\x84\x41\x6e\xa5\x2a\xe7\xe0\xf5\x2b\x55\x09\x5c\xe5\x90\x1b\x5d\xd7\xf4\xd1\xb8\x9d\x2c\x9a\xcd\x02\x8d\xe3\x60\x08\xe6\xbf\x47\x2a\x74\xbf\x83\xaa\x0e\xed\x92\x65\xe0\x2d\x70\xc1\xd7\x24\xda\x84\x38\x52\x59\x34\x5c\x38\x31\xee\xa5\x5d\xb9\xf9\xf1\xa6\x5e\x25\xb3\xd9\x78\xe6\x78\xf4\xe9\x75\x75\x28\x5e\x8f\x44\xcf\x37\x2b\x24\x56\x79\x93\xf1\x3c\x97\x56\x6a\xc5\xab\x80\x4d\xb7\xda\x09\x71\x64\xd7\x75\xd5\xd0\x79\xd6\xdc\x8a\xd5\xd5\x67\x29\x64\xc7\xb1\x3f\xf2\x40\x1f\x44\xc3\xa9\xc4\x13\x73\xd3\x6e\x7e\xdb\x49\xe4\xd7\x1c\xf5\x5b\x87\x72\x87\xdf\x8f\x0e\x3f\x17\x78\x1f\xb0\xe0\x0c\x88\x0d\x70\x50\x78\xdf\xaa\xd2\xc3\x62\x63\x30\xef\xb5\x58\xca\x3b\x54\xa0\x6b\x92\xb0\x61\x51\xb1\x51\xa2\x27\x93\xe8\xda\x36\xc0\x18\xbb\x74\xf3\x29\x1c\x07\xf2\x84\xb1\xc2\x79\xb7\xa7\xb9\xab\x74\xb9\x80\x4a\x97\xec\x17\x23\x95\xad\xd4\x1c\x56\x5a\xdf\x34\x0b\x78\xed\xfe\xef\x48\x5c\x51\x94\x2c\x30\x72\x84\x19\x63\x69\x34\x0b\xb2\x2d\x4e\xe1\xb5\x27\xbe\xf3\x24\x17\x20\x8a\xf2\xb1\x9d\x67\x52\x49\x9b\xa4\xd1\xcc\xa0\xdd\x18\x15\x4e\x44\xc7\x76\x12\x27\xa2\x15\x2d\x05\xbf\x92\x44\x7c\x16\xfe\x22\x20\x15\x4e\xa1\x85\xee\x05\xde\xfb\xb1\x44\xb0\xdc\xc8\x3b\x34\xe9\x8b\x71\x0c\x00\x30\x13\x6c\x0c\xbd\x53\x20\x5d\x4e\xe0\x2f\x11\xcc\x9f\x32\x9d\xb0\xe2\x65\xed\x2c\x82\x8a\xcc\x97\x73\xcb\x29\x82\x66\xcd\x6d\xc5\xce\x7f\x80\xa6\x46\x21\x0b\x89\x39\x5c\x3f\x38\x03\x7a\x41\x41\x11\x79\xae\x72\x22\xe0\x86\xb9\xe5\x6d\xbc\xa6\xb9\xb9\xf3\x5f\xaf\xbd\x3d\x58\x70\x6b\x29\x43\xe4\x60\x35\x48\xcb\xbc\x08\x1e\xb1\x50\x73\xc3\xd7\x68\xd1\x34\x20\xb8\x82\x6b\x04\x9e\xe7\x98\xfb\x20\x11\xe0\x44\x5e\xd9\x3b\x6c\xc0\x10\x1d\x22\xf1\xb2\x5d\x38\xf6\x24\xd0\x3b\x27\x8f\xd3\x44\x63\x8d\x8b\x2f\x01\x10\x43\x90\x25\xc1\x94\x73\x40\x63\xb4\x71\xa6\x6c\xee\xa5\x15\x2b\xe8\x09\x3a\x08\x52\x66\xd9\xed\xe0\x93\x96\x6a\x10\x75\xcf\x7d\x84\x6e\x20\x9e\x03\x39\xdc\x22\xb8\x4d\xe7\x6b\x35\x61\xb4\x80\x38\x84\xf2\xec\x55\x93\x05\x97\x25\xad\xc7\x3d\xa9\x10\xb8\xa7\xdc\x91\xf9\xb9\x1c\x0b\xbe\xa9\x2c\xb1\x08\xc8\x54\xb2\x9a\x43\xb1\xb6\xec\x2d\x09\x5f\x24\xf1\x46\x35\x1e\x7e\x98\x07\xf9\x17\xf0\xea\x36\x9e\x0f\x0e\x93\x46\xb3\xd6\xf8\x57\xdb\x3d\x23\x59\xc3\x55\x43\xb1\xcf\xd9\x23\xe8\x18\xae\x56\x08\xb5\xd1\x77\x92\x8c\x21\xb4\xb2\xb8\xb5\xb4\x5d\x36\xb0\xf1\xe9\xdf\xca\xca\x59\x65\xb0\x9f\x66\x85\x5e\xaf\xa5\x25\x59\xb4\x01\xa3\xab\x8a\x90\xc4\xc5\x0d\x3b\x74\xa4\xab\x6d\x22\xec\xb6\xa5\x4e\x89\x93\xfe\x93\x7d\xae\xb6\x43\xdb\xc8\x02\x3e\xcc\x41\xdf\xb8\x70\x10\x1c\x87\x25\xc7\x76\x7b\xee\x7d\xe8\x2f\x34\xb7\x7b\x46\x43\x6d\xb1\xf0\xf8\xb8\x20\x94\x29\x4d\xb9\x8c\x1b\x0b\x7c\x24\x3d\xc5\x2c\xa9\xc6\x83\xb1\x53\xdd\xcc\x7a\x81\x48\x02\x85\xf7\x5e\xf0\x39\x0c\xbc\x58\x16\x6e\xfe\xff\x4e\x89\xfb\x8b\x85\x71\x52\xb8\xdc\x37\xe4\xb9\x80\x57\x77\xb1\xe3\xe7\x99\xb7\x91\x90\xb5\x69\x97\x02\x5d\x70\xcb\x53\xb0\xdb\x2e\x68\xbd\xbe\xda\x12\x67\x61\xb7\x0b\x20\x01\xe9\x77\x1f\xeb\xe6\x3e\x73\x3d\x55\xc3\x9c\xb4\xa9\x61\x10\x4c\x16\x4f\x86\x97\xa2\x4c\x03\xbd\xb6\xc2\x98\x3d\xce\xe9\xb0\x91\x2b\xce\x4e\x20\x3b\x86\x65\xe1\x00\xd2\x04\xac\x07\x89\x03\x58\x1b\xb8\xda\x5e\x06\xdf\x4c\x2a\x79\x83\xf0\xee\xd7\x9f\x52\x70\x45\x5f\xef\x4c\x93\xbe\x64\xb7\xc1\xa9\x87\x9e\x14\xb6\xc9\x02\x56\xbc\xb9\x1a\xfb\x52\x08\x9f\xd3\x6e\x16\x36\xb6\xd5\x58\x96\xc1\x39\x5e\x6f\xca\x3d\x2f\xc9\x69\xec\xa4\xf5\x8e\xa5\xfd\xff\xe0\x07\x56\x43\x89\x16\xee\xd0\x5c\xeb\x06\x29\x43\x95\x64\x4f\xad\xda\x40\x2a\x28\xd2\x52\x85\xe3\xd2\x5f\x96\x45\x59\xd6\xa6\x1c\xc7\x27\x49\x69\xd4\x69\x32\x91\x2a\xc7\x6d\x67\x90\xef\xd2\x56\xe9\x7e\xc5\xaf\x1b\x34\x0f\xed\xf2\x33\xbd\x21\x33\xd8\x6d\x4a\x34\x0f\x5c\x2b\x90\x1e\xe6\x53\x59\x10\x5e\xdd\xd1\x06\xf0\x14\x2f\x40\x58\x50\x7d\x90\xb7\x05\x3d\xc1\xbf\xd2\xe5\x37\xc8\xb0\xae\x30\x25\xed\x09\xfa\xdb\x74\xe9\xc5\x15\xf6\x42\x2b\x85\xde\x3f\x29\xc1\xd4\x06\xef\x50\xd9\xc6\x19\xe5\x76\x83\x46\x62\x03\x85\xd1\xeb\xce\x97\x26\x02\x8d\xa3\x9e\xa4\x3e\xa4\xd0\xe9\x5b\x11\xda\x60\x12\x16\x04\x61\x7e\x6b\x5c\x16\xf2\x82\xac\x37\xd6\x19\xcf\xd7\x1b\x64\x6f\x2a\x92\x69\x06\x95\x95\xf6\x21\x9c\xc3\xd9\x16\x96\x0a\xb4\x71\x7d\x91\x26\x0a\x83\x3d\x3d\x1c\x44\xc8\x3d\x82\x57\xd5\x02\x3e\x06\xe5\x90\xc9\xd9\x6f\x0d\x26\x54\xb4\x7c\x9c\x38\x03\xcd\x79\x72\x8c\xb1\xbf\x69\x7d\xd3\x55\x20\xcf\x36\x25\x7b\x15\x03\xeb\xc8\xf8\xe2\x68\x5c\x1b\x44\x7d\x78\xd8\xa7\x44\x54\x7a\x3b\x3b\xa7\xec\xc8\xc6\x67\x7d\x63\x16\x8a\xed\xb0\xd4\x17\xdb\x7c\x58\x6a\x1f\x56\xd6\x6d\xa9\xef\x5a\x8d\xf1\xe6\x83\x8e\x23\x74\x7e\x06\x85\x93\x4f\xb1\xbf\xa3\x40\x07\xd3\xc7\xc7\xdd\x8e\xbc\x1f\x6f\xfd\x74\x2c\x62\x3f\xe6\xbe\xfa\x38\xf2\x8a\x7d\x4f\x71\x23\xb0\xff\x37\x54\xfa\xbe\xdd\x3d\x08\x01\x21\xec\xf5\x92\xf4\xd1\xe0\xd9\xb3\x38\x24\xf6\x65\xaf\x97\xba\xaf\x7a\x47\x34\x13\x11\xe6\x53\xdf\x42\xf4\xcc\x7a\x84\xbe\x1e\x4d\xf4\x7e\xf5\xb8\x0f\x55\x0e\x95\x6c\x2c\x35\xd2\x87\x80\x25\x79\xfc\x47\x63\x5d\x26\xce\x32\x78\xe3\xf0\x47\xb3\x1f\x09\x12\xc5\x1c\xca\x39\xac\xd2\x8f\x80\xb7\x1b\x5e\xb9\x6d\x1f\xf7\xfb\x56\x07\xbb\x26\x29\x92\x32\x59\x25\x69\x9a\x8e\x70\x3a\x12\xf4\x29\xb8\x0a\xe6\xb1\xb7\x5f\xc5\xf2\xba\x46\x95\x27\x93\xd3\xa1\xd2\x77\x78\x0d\xc1\xc2\xf5\x1e\x43\x93\xf8\x81\xd0\xa2\x39\xd3\x8c\x51\xff\xa4\x98\x9e\x54\x92\xb6\x4d\x9c\xff\x6e\x05\xdb\x45\xb3\x4e\x9b\x3e\xf3\xfb\x55\x3f\x87\xc1\xb0\xae\x2b\xb6\xe7\x70\x59\x7b\x0a\xe9\xd8\x82\x7b\x84\x7b\x3b\x76\x1b\x43\x37\x23\x82\x8e\xd3\x79\x67\xc7\x45\xf7\xeb\x71\x74\xfe\x1f\x36\xd5\xcd\x40\x07\xc3\xc3\xb7\xdd\xb5\x1b\xae\x6e\x08\x15\x63\x8d\xbb\xd0\x25\xb1\xf9\x9c\x62\x88\x47\xd2\x76\xbe\x64\xc9\x29\x35\xed\x29\x8f\xf6\x0c\x14\x38\xa5\x86\xc1\x92\x09\x55\xb4\xfc\x16\xdd\xaf\x0e\xed\x75\x3e\x32\xbc\x82\x8d\x1f\xf9\x02\xcb\x7b\x5a\xbd\xe5\xfd\xf7\xd7\x58\xde\x53\x38\xb0\xfc\x88\xf0\x57\x5a\xde\xd3\xba\x54\x9f\xd3\x41\x1f\x81\x7c\x92\xfa\x9c\x1a\x2e\x15\x26\x6d\xa8\x3c\xb8\xd1\xd8\x53\xd1\xa5\xfa\x06\x5a\xba\x54\x38\x27\x4b\xf9\x44\x12\x53\xe5\x1d\x0f\x58\x0e\x84\x49\x9f\x50\x68\x2f\xc6\xb7\xd2\xe9\xf2\xfc\xc5\x5a\x95\xf9\x0b\x34\xba\x3c\x4f\x64\x1e\xe0\xb8\x3c\x67\x57\x94\xde\xfe\x07\xda\x8c\x97\xe7\x94\x09\x13\x99\xff\xd7\x55\x79\x8e\x15\x8e\x02\x73\xee\x07\xbe\xc0\x3d\x3d\xa9\xde\x3d\xfd\xf7\xd7\xa8\xca\x53\x38\x50\xc1\x88\xf0\x37\x39\xff\xc8\x3d\xa7\x54\xf0\x72\xef\xec\x08\xbe\xc0\x3b\xbb\xb5\x87\xc1\x57\xf4\x93\xcb\xf3\x01\x29\xb6\x3c\x4f\xf7\x45\x1f\x7a\xc1\xf3\xc2\x3f\xe7\x04\x43\x7e\xcf\x39\xc1\x94\xd0\x2d\x37\xd7\x90\xb4\x38\x60\xff\x5c\xa1\xf1\x6a\x18\x95\x24\x8e\x3e\x01\x3b\xec\x62\xad\x4d\x98\xcc\xe1\x14\x5e\xcb\x7c\x62\x4a\xd7\x70\xda\x21\xe2\x52\xe1\x34\x26\x06\x6e\x11\x28\xb4\x76\x76\x9d\xd8\x40\x4d\xb7\xee\xfb\x0b\x50\x1e\x5a\xba\x56\x1b\xee\xf3\xc9\xdc\x39\x9c\x3d\x00\x6a\x2b\xda\x8f\x68\x07\x82\x4d\x64\xfd\x07\xb8\x7e\x00\x69\x9b\x67\xcd\xf7\x23\xda\xa9\xab\x99\x39\x4c\xda\x32\x39\xde\x2b\xd8\xfa\xab\x9b\x0e\x80\x6d\xf3\xfa\xbc\x19\xd9\xa5\xaa\x1e\x7c\x57\xdb\x1d\xe7\x5f\xfe\xd9\xe9\x06\xe9\x83\xaa\x03\x0b\x35\x57\x52\x34\x54\xed\x73\x15\x9a\x3a\x2d\xc4\xc6\x3c\x53\xcf\x10\xa1\x3f\x70\xa4\xf1\x89\xe8\x24\xfa\xfa\x53\x77\x05\x24\x58\x50\x10\xed\x9e\xbc\xfc\x71\x12\x26\xdd\x0d\x4e\x50\x83\xbe\xfe\x14\x3a\x98\x41\xcf\x86\xa1\x93\x79\x9b\x97\x7d\xab\x35\xf0\x81\x23\x74\x62\x8d\xcc\xdf\x81\x90\x82\x3e\x6f\x04\xaf\x68\x59\x2b\x6d\xdb\x16\xb7\xed\x49\x3f\x83\x79\x89\x54\x0d\xf2\x3f\x04\xd0\x29\x26\x9f\x0d\x48\xed\x09\xbc\xf6\xbc\x87\x2c\x4e\x3d\x96\xfb\xb9\x09\x1c\xfb\xb5\xac\xe6\x76\x05\xa7\x40\x82\x3d\x71\x4b\x48\xbd\xd6\x3f\xdc\x41\xba\x9b\xd9\x1f\x3a\xc2\x73\xf8\x30\x80\x61\xff\xa6\x82\x5b\x4b\x6d\xde\x91\x82\xb8\x6d\x1d\xe3\xd0\x30\x92\x01\x62\xb2\x47\xbc\xcc\x5d\x3b\x1b\x3b\x0e\x31\xf4\x17\x63\xcf\x5c\xf0\x3a\xa9\x33\xda\xb1\x77\x2b\xf5\xc4\x73\x0b\x1b\xdc\xfd\x76\x57\x68\x2d\x50\x1c\x63\x7f\x9d\x36\x80\x8f\x63\x11\x39\x80\x0c\x5a\x55\x97\x97\x3a\x9f\x1f\x3c\x6c\xf9\xb6\xe9\x49\xd3\x86\x7c\x06\xbf\xbf\xa7\x5f\x83\xe7\x0c\x6d\x9c\x35\x37\x6b\x4f\xd9\xff\xfe\x45\x57\x52\x3c\xf8\xf3\xf8\xbe\xce\xf9\xc1\x44\xbf\xd6\x9f\x22\x74\x75\x6e\xcd\xef\x8b\x0a\x95\xff\x99\x0e\x7e\xbe\x9f\xc3\x74\x97\xf9\xfb\xe2\xfd\xe0\x86\xa2\x6a\xc6\x94\x9f\x60\x3c\xbe\xcd\xe8\xd5\x34\x50\xd8\x6e\x97\x1d\xc3\x9b\xfe\x35\xce\x3d\x7e\x86\x97\x07\x7d\x87\xc6\xb8\x0b\x6f\xb9\x77\x8f\xd3\x3f\xb1\x81\x7f\x74\x6b\xdb\xea\x70\x7b\x13\x6e\x2d\xf7\x5e\xaa\xa7\x9e\xf8\x46\x17\x0d\xff\x09\x00\x00\xff\xff\x0e\xc7\x2b\x9f\xa0\x1f\x00\x00") +var _templateClientTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x59\xdf\x73\xe3\xb6\xf1\x7f\x96\xfe\x8a\xfd\x72\x7c\xf7\x25\x3d\x3a\x30\xcd\x5b\xd5\xf1\xc3\xe5\x7c\x4d\x35\x93\xd8\x49\xcf\x69\x3b\x93\xc9\xe4\x60\x70\x49\x21\xa6\x00\x1a\x84\x6c\x79\x54\xff\xef\x9d\xc5\x0f\xfe\x90\x68\x9f\x93\xbb\x4e\x5f\x6c\x11\x20\x76\x17\x9f\xfd\xec\x62\x17\xdc\xef\xf3\xd3\xf9\x3b\xdd\x3c\x18\x59\xad\x2d\x7c\xfd\xd5\x9f\xfe\xfc\xa6\x31\xd8\xa2\xb2\xf0\x57\x2e\xf0\x5a\xeb\x1b\x58\x29\xc1\xe0\x6d\x5d\x83\x7b\xa9\x05\x9a\x37\x77\x58\xb0\xf9\xd5\x5a\xb6\xd0\xea\xad\x11\x08\x42\x17\x08\xb2\x85\x5a\x0a\x54\x2d\x16\xb0\x55\x05\x1a\xb0\x6b\x84\xb7\x0d\x17\x6b\x84\xaf\xd9\x57\x71\x16\x4a\xbd\x55\xc5\x5c\x2a\x37\xff\xdd\xea\xdd\xfb\x8b\x0f\xef\xa1\x94\x35\x42\x18\x33\x5a\x5b\x28\xa4\x41\x61\xb5\x79\x00\x5d\x82\x1d\x28\xb3\x06\x91\xcd\x4f\xf3\xc7\xc7\xf9\x7c\xbf\x87\x02\x4b\xa9\x10\x12\x51\x4b\x54\x36\x81\x30\x7c\xd2\xdc\x54\xb0\x3c\x83\x6b\xde\x22\x9c\xb0\x77\x5a\x95\xb2\x62\x3f\x70\x71\xc3\x2b\xa4\x97\xf6\x7b\xb0\xb8\x69\x6a\x6e\x11\x92\x35\xf2\x02\x4d\x02\x27\x6e\xb9\xdc\x34\xda\x58\x48\xe7\xb3\xa4\xd6\x55\x32\x9f\xcf\x12\x92\x78\x2c\x24\xdf\xc8\xca\x70\x8b\xc9\x7c\xb6\xdf\x83\xe1\xaa\x42\x38\xf9\x75\x01\x27\x8a\x54\x9f\xb0\x0b\x5d\x60\x4b\x22\x67\x5e\x82\x9a\x10\xe1\xc7\xfb\x01\x27\xeb\x0d\xa0\x2a\x9c\x2d\xb3\x04\x95\xad\x34\x93\x3a\x47\x65\xf3\x42\xf2\x1a\x85\x3d\x52\x18\x4c\x76\x5a\x3f\x58\x6d\x78\x85\x6c\xe5\xc6\x5a\x78\xd3\x1b\x10\x5e\x0b\x5a\x9c\x12\x9a\xcd\xe6\xf3\x3c\x87\x77\x0e\x41\xf2\x23\x39\xc1\xe3\x09\x76\xcd\x2d\xac\x75\x5d\xb4\xc0\xeb\x1a\x68\xe8\x7a\x2b\xeb\x02\x4d\xcb\xe6\xf6\xa1\xc1\xb8\xac\xb5\x66\x2b\x2c\xec\xe7\x33\xe1\xf6\xe8\xb7\x21\x4b\x32\x68\xdb\x90\xda\xef\x3d\x58\x1e\x8f\x3c\x87\x0f\x62\x8d\x1b\x7e\xa0\xaf\xd4\x06\x84\x41\x6e\xa5\xaa\x16\xe0\xf1\x95\xaa\x02\xae\x0a\x28\x8c\x6e\x1a\x7a\x68\xdd\x4a\x36\x9f\xcd\x82\x8c\xd3\xe0\x08\xe6\x9f\x47\x10\xba\xdf\x01\xaa\x63\xbf\xe4\x39\x78\x0f\x5c\xf0\x0d\x99\x36\x61\x8e\x54\x16\x0d\x17\xce\x8c\x7b\x69\xd7\x6e\x7e\xbc\xa8\x87\x64\x36\x1b\xcf\x9c\x8e\x1e\x3d\x56\xc7\xe6\xf5\x4c\xf4\x7a\xf3\x52\x62\x5d\xb4\x39\x2f\x0a\x69\xa5\x56\xbc\x0e\xdc\x74\x6f\x3b\x23\x4e\xec\xa6\xa9\x5b\xda\xcf\x86\x5b\xb1\xbe\xfa\xa4\x84\xfc\x34\xf1\x5b\x1e\xe0\x41\x32\x1c\x24\x5e\x98\x9b\x76\xf3\xbb\xce\x22\xff\xce\x49\xbf\x74\x68\x77\xf8\xfd\xe8\xf8\x73\x81\xf7\x81\x0b\xce\x81\xd8\x02\x07\x85\xf7\x11\x4a\x4f\x8b\xad\xc1\xa2\x47\xb1\x92\x77\xa8\x40\x37\x64\x61\xcb\xe6\xe5\x56\x89\x5e\x4c\xaa\x1b\xdb\x02\x63\xec\xd2\xcd\x67\x70\x1a\xc4\x13\xc7\x4a\x17\xdd\x5e\xe6\xbe\xd6\xd5\x12\x6a\x5d\xb1\x1f\x8c\x54\xb6\x56\x0b\x58\x6b\x7d\xd3\x2e\xe1\xb5\xfb\xbf\x27\x73\x45\x59\xb1\xa0\xc8\x09\x66\x8c\x65\xf3\x59\xb0\x6d\x79\x06\xaf\xbd\xf0\xbd\x17\xb9\x04\x51\x56\x8f\x71\x9e\x49\x25\x6d\x9a\xcd\x67\x06\xed\xd6\xa8\xb0\x23\xda\xb6\xb3\x38\x15\xd1\xb4\x0c\xfc\x9b\x64\xe2\xb3\xf4\x17\x81\xa9\x70\x06\x91\xba\x17\x78\xef\xc7\x52\xc1\x0a\x23\xef\xd0\x64\x2f\xe6\x31\x00\xc0\x4c\xb0\x31\xf5\xce\x80\xb0\x9c\xe0\x5f\x2a\x98\xdf\x65\x36\xe1\xc5\xcb\xc6\x79\x04\x15\xb9\xaf\xe0\x96\x53\x06\xcd\xdb\xdb\x9a\x9d\x7f\x03\x6d\x83\x42\x96\x12\x0b\xb8\x7e\x70\x0e\xf4\x86\x82\x22\xf1\x5c\x15\x24\xc0\x0d\x73\xcb\x63\xbe\xa6\xb9\x85\x8b\x5f\x8f\xde\x01\x2d\xb8\xb5\x74\x42\x14\x60\x35\x48\xcb\xbc\x09\x9e\xb1\xd0\x70\xc3\x37\x68\xd1\xb4\x20\xb8\x82\x6b\x04\x5e\x14\x58\xf8\x24\x11\xe8\x44\x51\xd9\x07\x6c\xe0\x10\x6d\x22\xf5\xb6\x5d\x38\xf5\x64\xd0\x07\x67\x8f\x43\xa2\xb5\xc6\xe5\x97\x40\x88\x21\xc9\xd2\xe0\xca\x05\xa0\x31\xda\x38\x57\xb6\xf7\xd2\x8a\x35\xf4\x02\x1d\x05\xe9\x64\xd9\xef\xe1\x37\x2d\xd5\x20\xeb\x9e\xfb\x0c\xdd\x42\xb2\x00\x0a\xb8\x65\x08\x9b\x2e\xd6\x1a\xe2\x68\x09\x49\x48\xe5\xf9\xab\x36\x0f\x21\x4b\xa8\x27\xbd\xa8\x90\xb8\xa7\xc2\x91\xf9\xb9\x02\x4b\xbe\xad\x2d\xa9\x08\xcc\x54\xb2\x5e\x40\xb9\xb1\xec\x3d\x19\x5f\xa6\xc9\x56\xb5\x9e\x7e\x58\x04\xfb\x97\xf0\xea\x36\x59\x0c\x36\x93\xcd\x67\xd1\xf9\x57\xbb\x03\x27\x59\xc3\x55\x4b\xb9\xcf\xf9\x23\x60\x0c\x57\x6b\x84\xc6\xe8\x3b\x49\xce\x10\x5a\x59\xdc\x59\x5a\x2e\x5b\xd8\xfa\xe3\xdf\xca\xda\x79\x65\xb0\x9e\x66\x85\xde\x6c\xa4\x25\x5b\xb4\x01\xa3\xeb\x9a\x98\xc4\xc5\x0d\x3b\x0e\xa4\xab\x5d\x2a\xec\x2e\x4a\xa7\x83\x93\xfe\x93\x7f\xae\x76\x43\xdf\xc8\x12\x7e\x5d\x80\xbe\x71\xe9\x20\x04\x0e\x4b\x4f\xed\xee\xdc\xc7\xd0\x5f\x68\x6e\xff\x0c\x42\xb1\x58\x78\x7c\x5c\x12\xcb\x94\xa6\xb3\x8c\x1b\x0b\x7c\x64\x3d\xe5\x2c\xa9\xc6\x83\x89\x83\x6e\x66\xbd\x41\x64\x81\xc2\x7b\x6f\xf8\x02\x06\x51\x2c\x4b\x37\xff\x7f\x67\xa4\xfd\xc5\xc6\x38\x2b\xdc\xd9\x37\xd4\xb9\x84\x57\x77\x89\xd3\xe7\x95\xc7\x4c\xc8\xe2\xb1\x4b\x89\x2e\x84\xe5\x19\xd8\x5d\x97\xb4\x5e\x5f\xed\x48\xb3\xb0\xbb\x25\x90\x81\xf4\xbb\xcf\x75\x0b\x7f\x72\x3d\x55\xc3\xbc\x89\x47\xc3\x20\x99\x2c\x9f\x4c\x2f\x65\x95\x05\x79\xb1\xc2\x98\x3d\x2e\x68\xb3\x73\x57\x9c\xbd\x81\xfc\x14\x56\xa5\x23\x48\x1b\xb8\x1e\x2c\x0e\x64\x6d\xe1\x6a\x77\x19\x62\x33\xad\xe5\x0d\xc2\x87\x1f\xbf\xcb\xc0\x15\x7d\x7d\x30\x4d\xc6\x92\xdd\x85\xa0\x1e\x46\x52\x58\x26\x4b\x58\xf3\xf6\x6a\x1c\x4b\x21\x7d\x4e\x87\x59\x58\x18\xab\xb1\x3c\x87\x73\xbc\xde\x56\x07\x51\x52\xd0\xd8\x9b\x18\x1d\x2b\xfb\xff\x21\x0e\xac\x86\x0a\x2d\xdc\xa1\xb9\xd6\x2d\xd2\x09\x55\x91\x3f\xb5\x8a\x89\x54\x50\xa6\xa5\x0a\xc7\x1d\x7f\x79\x3e\xcf\xf3\x78\xe4\x38\x3d\x69\x46\xa3\x0e\xc9\x54\xaa\x02\x77\x9d\x43\xbe\xca\x22\xe8\xfe\x8d\x1f\xb7\x68\x1e\xe2\xeb\xef\xf4\x96\xdc\x60\x77\x19\xc9\x3c\x0a\xad\x20\x7a\x78\x9e\xca\x92\xf8\xea\xb6\x36\xa0\xa7\x78\x01\xc3\x02\xf4\xc1\xde\x48\x7a\xa2\x7f\xad\xab\x2f\x70\xc2\xba\xc2\x94\xd0\x13\xf4\xb7\xed\x8e\x17\x57\xd8\x0b\xad\x14\xfa\xf8\xa4\x03\xa6\x31\x78\x87\xca\xb6\xce\x29\xb7\x5b\x34\x12\x5b\x28\x8d\xde\x74\xb1\x34\x91\x68\x9c\xf4\x34\xf3\x29\x85\x76\x1f\x4d\x88\xc9\x24\xbc\x10\x8c\xf9\xa9\x75\xa7\x90\x37\x64\xb3\xb5\xce\x79\xbe\xde\x20\x7f\x53\x91\x4c\x33\xa8\xac\xb4\x0f\x61\x1f\xce\xb7\xb0\x52\xa0\x8d\xeb\x8b\x34\x49\x18\xac\xe9\xe9\x20\xc2\xd9\x23\x78\x5d\x2f\xe1\x63\x00\x87\x5c\xce\x7e\x6a\x31\xa5\xa2\xe5\xe3\xc4\x1e\x68\xce\x8b\x63\x8c\xfd\x4d\xeb\x9b\xae\x02\x79\xb6\x29\x39\xa8\x18\x58\x27\xc6\x17\x47\xe3\xda\x60\xde\xa7\x87\x43\x49\x24\xa5\xf7\xb3\x0b\xca\x4e\x6c\xf2\xae\x6f\xcc\x42\xb1\x1d\x5e\xf5\xc5\x36\x1f\x96\xda\xc7\x95\x75\x2c\xf5\x5d\xab\x31\x5e\x7c\xd4\x71\x84\xce\xcf\xa0\x70\xf6\x29\xf6\x77\x14\xe8\x68\xfa\xf8\xb8\xdf\x53\xf4\xe3\xad\x9f\x4e\x44\xe2\xc7\xdc\x53\x9f\x47\x5e\xb1\xaf\x29\x6f\x04\xf5\xff\x86\x5a\xdf\xc7\xd5\x83\x14\x10\xd2\x5e\x6f\x49\x9f\x0d\x9e\xdd\x8b\x63\x62\x5f\xf6\x7a\xab\xfb\xaa\x77\x24\x33\x15\x61\x3e\xf3\x2d\x44\xaf\xac\x67\xe8\xeb\xd1\x44\x1f\x57\x8f\x87\x54\xe5\x50\xcb\xd6\x52\x23\x7d\x4c\x58\xb2\xc7\x3f\xb4\xd6\x9d\xc4\x79\x0e\x6f\x1d\xff\x68\xf6\x23\x51\xa2\x5c\x40\xb5\x80\x75\xf6\x11\xf0\x76\xcb\x6b\xb7\xec\xe3\x61\xdf\xea\x68\xd7\xa6\x65\x5a\xa5\xeb\x34\xcb\xb2\x11\x4f\x47\x86\x3e\x45\x57\xc1\x3c\xf7\x0e\xab\x58\xde\x34\xa8\x8a\x74\x72\x3a\x54\xfa\x8e\xaf\x21\x59\xb8\xde\x63\xe8\x12\x3f\x10\x5a\x34\xe7\x9a\x31\xeb\x9f\x34\xd3\x8b\x4a\xb3\xd8\xc4\xf9\xe7\x68\xd8\x7e\x3e\xeb\xd0\xf4\x27\xbf\x7f\xeb\xfb\x30\x18\xde\xeb\x8a\xed\x05\x5c\x36\x5e\x42\x36\xf6\xe0\x81\xe0\xde\x8f\xdd\xc2\xd0\xcd\x88\x80\x71\xb6\xe8\xfc\xb8\xec\x7e\x3d\x8e\xf6\xff\xcd\xb6\xbe\x19\x60\x30\xdc\x7c\xec\xae\xdd\x70\x7d\x43\xac\x18\x23\xee\x52\x97\xc4\xf6\x53\xc0\x90\x8e\x34\x76\xbe\xe4\xc9\x29\x98\x0e\xc0\xa3\x35\x03\x00\xa7\x60\x18\xbc\x32\x01\x45\xd4\xb7\xec\x7e\x75\x6c\x6f\x8a\x91\xe3\x15\x6c\xfd\xc8\x1f\xf0\xbc\x97\xd5\x7b\xde\x3f\x7f\x8e\xe7\xbd\x84\x23\xcf\x8f\x04\x7f\xa6\xe7\xbd\xac\x4b\xf5\x29\x0c\xfa\x0c\xe4\x0f\xa9\x4f\xc1\x70\xa9\x30\x8d\xa9\xf2\xe8\x46\xe3\x00\xa2\x4b\xf5\x05\x50\xba\x54\xb8\x20\x4f\xf9\x83\x24\xa1\xca\x3b\x19\xa8\x1c\x18\x93\x3d\x01\x68\x6f\xc6\x97\xc2\x74\x75\xfe\x62\x54\x65\xf1\x02\x44\x57\xe7\xa9\x2c\x02\x1d\x57\xe7\xec\x8a\x8e\xb7\xff\x01\x9a\xc9\xea\x9c\x4e\xc2\x54\x16\xff\x75\x28\xcf\xb1\xc6\x51\x62\x2e\xfc\xc0\x1f\x08\x4f\x2f\xaa\x0f\x4f\xff\xfc\x39\x50\x79\x09\x47\x10\x8c\x04\x7f\x91\xfd\x8f\xc2\x73\x0a\x82\x97\x47\x67\x27\xf0\x05\xd1\xd9\xbd\x7b\x9c\x7c\x45\x3f\xb9\x3a\x1f\x88\x62\xab\xf3\xec\xd0\xf4\x61\x14\x3c\x6f\xfc\x73\x41\x30\xd4\xf7\x5c\x10\x4c\x19\x1d\xb5\xb9\x86\x24\xf2\x80\xfd\x73\x8d\xc6\xc3\x30\x2a\x49\x9c\x7c\x22\x76\x58\xc5\xa2\x4f\x98\x2c\xe0\x0c\x5e\xcb\x62\x62\x4a\x37\x70\xd6\x31\xe2\x52\xe1\x34\x27\x06\x61\x11\x24\x44\x3f\xbb\x4e\x6c\x00\xd3\xad\x7b\xfe\x03\x2c\x0f\x2d\x5d\x44\xc3\x3d\x3e\x79\x76\x0e\x67\x8f\x88\x1a\x4d\xfb\x16\xed\xc0\xb0\x89\x53\xff\x01\xae\x1f\x40\xda\xf6\x59\xf7\x7d\x8b\x76\xea\x6a\x66\x01\x93\xbe\x4c\x4f\x0f\x0a\xb6\xfe\xea\xa6\x23\x60\x6c\x5e\x9f\x77\x23\xbb\x54\xf5\x83\xef\x6a\xbb\xed\xfc\xcb\x7f\x76\xba\x41\x7a\xa0\xea\xc0\x42\xc3\x95\x14\x2d\x55\xfb\x5c\x85\xa6\x4e\x0b\xb1\x35\xcf\xd4\x33\x24\xe8\x77\x6c\x69\xbc\x23\xda\x89\xbe\xfe\xad\xbb\x02\x12\x2c\x00\x44\xab\x27\x2f\x7f\x9c\x85\x69\x77\x83\x13\x60\xd0\xd7\xbf\x85\x0e\x26\x74\x59\x18\xba\x98\xf7\x45\xd5\xb7\x59\x03\xfe\x9f\xa0\x33\x69\xe4\x7a\xf7\x0e\x37\xae\x61\x0f\x71\xdc\x77\x3e\x34\x9e\xc8\x22\xb6\x3e\xf4\x78\x06\x89\xd2\x05\x26\xa3\x1e\x27\x92\x98\x0e\x0d\xde\x0a\x5e\x93\xaa\xb8\xdb\xd8\x56\xc7\xf6\xa6\x9f\xc1\xa2\x42\xaa\x26\xf9\xef\x22\xf8\x94\x92\x34\x9a\xf7\x54\x42\x8b\x28\x78\xf4\x7d\x84\x2d\xcf\x7c\x2c\xf4\x73\x13\x71\xe0\xdf\x65\x0d\xb7\x6b\x38\x03\x32\xec\x89\x5b\x46\xea\xd5\xfe\xe1\x36\xd2\xdd\xec\x7e\xd3\x09\x5e\xc0\xaf\x03\x1a\xf7\xdf\x64\x70\x67\x09\xc2\x13\x05\x49\x6c\x3d\x93\x00\x3b\x39\x31\x21\x9f\x26\xab\xc2\xb5\xc3\x89\xd3\x90\x40\x7f\xb1\xf6\xcc\x05\xb1\xb3\x3a\xa7\x15\x07\xb7\x5a\x4f\x7c\xae\x61\x83\xbb\xe3\xee\x0a\x2e\x12\xcd\x29\xf6\xd7\x71\x03\xfa\x39\x15\x73\x47\xa0\x41\xab\xeb\xce\xb5\x2e\x67\x0c\x3e\x8c\xf9\xb6\xeb\x49\xd7\x86\xf3\x10\x7e\xfe\x85\x7e\x0d\x3e\x87\x68\xe3\xbc\xb9\xdd\x78\xc9\xfe\xf7\x0f\xba\x96\xe2\xc1\xef\xc7\xf7\x85\x2e\x8e\x26\xfa\xbd\x7e\x17\xa1\x2b\x74\xef\xfc\xbc\xac\x51\xf9\x9f\xd9\xe0\xe7\x2f\x0b\x98\xee\x52\x7f\x5e\xfe\x32\xb8\xe1\xa8\xdb\xb1\xe4\x27\x14\x8f\x6f\x43\x7a\x98\x06\x80\xed\xf7\xf9\x29\xbc\xed\xbf\xe6\xb9\x8f\xa7\xe1\xcb\x85\xbe\x43\x63\xdc\x85\xb9\x3c\xb8\x07\xea\x3f\xd1\x81\xff\x68\x17\xdb\xf2\x70\xfb\x13\x6e\x3d\x0f\xbe\x74\x4f\x7d\x22\x1c\x5d\x54\xfc\x27\x00\x00\xff\xff\x7b\x7b\x22\x47\xe0\x1f\x00\x00") func templateClientTmplBytes() ([]byte, error) { return bindataRead( @@ -306,7 +306,7 @@ func templateClientTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/client.tmpl", size: 8096, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/client.tmpl", size: 8160, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/client.tmpl b/entc/gen/template/client.tmpl index ea9c9667c..99b8c931e 100644 --- a/entc/gen/template/client.tmpl +++ b/entc/gen/template/client.tmpl @@ -219,13 +219,14 @@ func (c *{{ $client }}) GetX(ctx context.Context, id {{ $n.ID.Type }}) *{{ $n.Na return obj } -{{ range $_, $e := $n.Edges }} +{{ range $e := $n.Edges }} {{ $builder := $e.Type.QueryName }} +{{ $arg := $rec }}{{ if eq $arg "id" }}{{ $arg = "node" }}{{ end }} // Query{{ pascal $e.Name }} queries the {{ $e.Name }} edge of a {{ $n.Name }}. -func (c *{{ $client }}) Query{{ pascal $e.Name }}({{ $rec }} *{{ $n.Name }}) *{{ $builder }} { +func (c *{{ $client }}) Query{{ pascal $e.Name }}({{ $arg }} *{{ $n.Name }}) *{{ $builder }} { query := &{{ $builder }}{config: c.config} query.path = func(ctx context.Context) (fromV {{ $.Storage.Builder }}, _ error) { - {{- with extend $n "Receiver" $rec "Edge" $e "Ident" "fromV" }} + {{- with extend $n "Receiver" $arg "Edge" $e "Ident" "fromV" }} {{ $tmpl := printf "dialect/%s/query/from" $.Storage }} {{- xtemplate $tmpl . -}} {{- end -}}