diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index 9b1d0fb7d..9f20ea524 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -632,7 +632,7 @@ func templateDialectSqlByTmpl() (*asset, error) { return a, nil } -var _templateDialectSqlCreateTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x58\x6d\x6f\xdb\xc8\x11\xfe\x4c\xfe\x8a\x39\xc1\x0d\x48\x57\xa6\x9c\xa0\x28\x50\xa7\x3a\x20\x67\x27\xad\x70\xbd\xb4\x80\x9d\xc3\xa1\x86\x11\x50\xe4\x50\x5a\x88\xda\x65\x76\x97\x8e\x0d\x83\xff\xbd\x98\xd9\x5d\x8a\x7a\xb1\xec\x43\xdb\x0f\x89\xa5\xdd\x79\xdb\xd9\x67\x9e\x9d\xd1\xd3\xd3\xe4\x34\xbe\x54\xcd\xa3\x16\x8b\xa5\x85\x77\xe7\x6f\xff\x72\xd6\x68\x34\x28\x2d\x7c\xca\x0b\x9c\x2b\xb5\x82\x99\x2c\x32\xf8\x50\xd7\xc0\x42\x06\x68\x5f\xdf\x63\x99\xc5\x37\x4b\x61\xc0\xa8\x56\x17\x08\x85\x2a\x11\x84\x81\x5a\x14\x28\x0d\x96\xd0\xca\x12\x35\xd8\x25\xc2\x87\x26\x2f\x96\x08\xef\xb2\xf3\xb0\x0b\x95\x6a\x65\x19\x0b\xc9\xfb\xff\x98\x5d\x7e\xfc\x7c\xfd\x11\x2a\x51\x23\xf8\x35\xad\x94\x85\x52\x68\x2c\xac\xd2\x8f\xa0\x2a\xb0\x03\x67\x56\x23\x66\xf1\xe9\xa4\xeb\xe2\x98\xce\x00\x0b\x65\x1f\x1b\xbc\x00\x94\x76\xa1\x32\xa1\x26\x28\x2d\xfd\x2b\x26\x0b\x94\x19\xed\x5d\x17\xaa\x41\x08\x2a\x50\x62\x25\x24\xc2\xa8\x14\x79\x8d\x85\x9d\x98\x6f\xf5\xa4\xd0\x98\x5b\x1c\x41\xd7\x91\xc4\xc9\xbc\x15\x35\x1d\xe1\x62\x0a\x4d\x6e\x8a\xbc\x86\x93\x8c\xad\x64\x3f\xf9\x1d\x2f\xa8\xb1\x40\x71\xef\x24\xfb\xcf\xbd\xba\x17\x5a\xb7\x36\xb7\x42\x49\x36\xa7\x85\xb4\x03\xbd\x51\x16\x76\x47\x40\xf2\x71\xd5\xca\x02\x92\x2d\xdb\x5d\x07\xa7\xc3\xa8\xba\x2e\x05\xf3\xad\xbe\xce\xef\x31\x29\xec\x03\x14\x4a\x5a\x7c\xb0\xd9\xa5\xfb\x9b\x42\xc2\xe2\xd9\xe7\x7c\x8d\xd0\x75\x63\x40\xad\x95\x4e\xe1\x29\x8e\xbe\x4a\x55\xe2\x18\xbe\x9a\x06\x0b\x0a\x67\xc7\x4f\xe6\xf2\x70\xdd\x60\x91\xa4\x71\x24\x2a\x52\x25\x39\xf3\xad\x5e\xe8\xbc\x59\x66\x97\x2c\xf0\x59\x95\xec\x7a\xbc\x67\xa0\xd4\xf4\xc9\x7b\x48\xdf\xb3\xfe\x0f\x53\x90\xa2\x26\xf7\x64\xb1\x37\x35\x33\x97\x4a\x1a\xab\x73\x21\xed\x47\x8a\x30\x41\xed\xa2\x8c\x22\x52\x9b\xc2\x9b\x1d\x81\x27\xd4\x3a\x73\xa2\x29\x9f\xaa\x8b\xa3\x88\xfe\x69\xb4\xad\x96\xe4\x85\x97\x63\x5a\x7c\x7a\x3a\x03\x51\x41\x2e\x4b\x38\xc9\x66\x57\xd9\x17\x83\xfa\x8a\xaf\xbe\x84\x44\x69\xb7\x38\x33\xd7\x56\x0b\xb9\x08\xdf\xbe\x7c\x99\x5d\xa5\x74\x0f\x11\xeb\x4f\x4e\xe1\x4a\x81\x54\x76\x29\xe4\x62\x0c\x73\x2c\xf2\xd6\x20\xa1\xd4\x20\xbc\x03\x02\x97\x81\x75\x6b\x2c\xcc\x11\x4c\xdb\x34\xb5\xc0\x12\xe6\x8f\x8c\xe3\xd6\xa0\xce\xe0\x74\x02\x67\x9d\x0f\x07\x6b\x83\x1b\xe3\xa2\xda\x0f\x8c\x37\x29\x4b\x7c\x51\xd9\xec\x0a\xa6\x53\x38\xe7\x9c\xb0\x01\xd9\x8b\x94\x74\x2d\x9c\x65\xb2\xf1\x6b\x5e\xb7\x98\x25\x42\xda\x3f\xff\x29\xa5\xfd\x8d\x3e\x5f\x11\xc9\xdc\x3c\x36\xe4\x3d\x11\x65\xfa\x62\x04\xdd\x8e\xc3\xe1\x67\x9f\x6c\x0f\x25\x29\xea\xf8\xf5\xb0\x1d\xe2\x6b\x0f\xa6\xa7\x3b\x28\x23\x31\xc6\xc3\x7d\xae\x21\x89\xfd\xa1\x08\x17\x43\xbd\xa7\x42\xc9\x4a\x2c\x2e\xf6\xb1\xcc\xeb\x74\x12\x07\xf7\x29\xbc\x39\xe0\x80\xe1\x76\x93\xcf\x6b\x74\x16\xb2\x7f\xe5\xc5\x2a\x5f\x90\xe5\x8c\x97\xc7\x24\x30\xbb\xba\x18\x68\x7f\x12\x58\x97\xbd\x72\x74\xc3\xfc\x53\xd1\x62\x36\x4c\x76\xc6\xf0\x0d\xc7\x63\xd1\x4b\x55\xb7\x6b\xb9\xef\x29\xa8\xb1\x46\x2e\x6d\x50\xe0\xff\xbb\x38\x4a\xe3\x80\xc7\x0f\x75\xad\xbe\x83\x23\x0d\xb9\x60\xa0\x1d\x38\x15\x61\x90\x98\x1c\x1f\x2c\x4a\x23\x94\x34\xa0\x34\x23\x12\x2c\xae\x9b\x3a\xb7\x68\x32\x66\x44\xb6\xfb\x5d\xd8\x25\x9c\xd8\x75\x53\x1b\x82\xd5\x3a\xb7\xc5\xf2\xc6\xcb\x1d\x22\xca\x09\x25\x74\x72\x3a\xda\x80\x59\xe7\x72\x81\xce\x04\x59\xf0\xb6\x1c\x98\x68\xff\x21\xb8\xf5\x32\x27\x1b\xd5\x43\x18\x3b\x8a\x4e\x51\x81\x28\xc7\xa0\x56\x81\xc1\x7a\x82\x1d\x64\xf2\x17\xbf\xf6\x37\xa4\x64\x26\xe9\x7b\x92\x7f\xda\x29\x0d\x51\xf2\xc2\x56\x15\x85\xe5\x03\x11\xf9\x43\x56\x7c\xc2\xde\x03\xa3\xc1\xf4\xa1\xdd\x93\x91\x63\xd1\x55\xc7\x62\xe3\x50\xbc\xc5\x29\xe4\x4d\x83\xb2\x4c\x86\xab\xe3\xd7\xe3\xb0\x7a\x0e\x85\x7c\xce\x0b\x1f\xe9\x8b\xb8\xac\xf6\x51\x39\xa0\x18\x27\x71\x6d\x75\x5b\x58\x8e\x87\xea\x9e\x0f\x4e\xf7\x57\x65\x9f\x45\x5d\x53\x19\xb9\xdc\x76\x1d\xd5\xae\xcb\x29\xbb\x3f\x9a\x68\x74\x89\xfe\x58\x2e\x70\x93\x5f\xf2\x6a\x9e\xcb\x2d\xee\x44\x32\xbb\x32\x94\xde\x1a\x65\xc2\x7a\x29\xfc\xe8\xe9\x74\x83\x7b\xae\x91\x12\x4e\x60\x44\x8e\x46\xe4\x76\x44\x0f\x9c\x19\x81\xd5\x2d\xc2\xe8\xdf\xa8\xd5\x08\x46\x52\xd4\x1e\xf0\xa4\xdc\xd7\xd1\x76\x7d\x94\x58\x21\x5b\xc9\x88\x9a\xa8\x3f\x29\x3d\x74\x85\xa4\x42\x9d\xb4\x4d\x99\x5b\xcc\xb8\x08\x5c\x01\xee\x52\x7b\xc0\x3e\x66\xff\xfc\x2e\x3f\xfd\xbc\x71\x79\x06\x27\x15\xa3\xea\x04\xb3\x4f\x4a\xa3\x58\xc8\x9f\xf1\x31\xec\x0f\xae\x63\xf5\xfc\x7d\xac\x1c\x68\x8e\x5c\x0b\xe7\xe9\xf6\xfc\x6e\x3f\x30\x07\x43\x77\x1b\x3b\xd8\xe4\xc5\x31\xd0\xd1\xd3\xfd\x2b\xdd\x7e\x31\x58\x23\x76\xbd\x98\x97\x38\xde\x96\x7d\x9d\xb7\xf5\xea\xff\xd0\x9b\xc5\x93\x09\x50\x13\xe5\x5f\x25\xc3\x64\x3a\x7c\x5a\x88\x42\x85\x15\x68\x42\x6b\x5a\xe6\x36\x9f\xe7\x06\xb3\xd7\xbe\x77\x47\x7a\xb4\xdb\xbb\x67\xbb\x34\x4a\x90\x27\xe2\x15\x92\xe0\x01\x86\x1f\x33\xa8\x77\xdf\x3c\xef\xdb\xa4\x69\x1c\xf5\x85\x12\xac\x6c\xbb\x7b\x49\x9d\x4b\x4b\xe9\xa1\x85\x5f\xdc\xd2\xcb\xba\x95\xd2\x20\x38\xef\x5c\xc8\xcf\x89\x72\x21\x52\x26\x13\x01\x42\xda\xb1\x6b\xfd\xf7\x52\xc5\xe5\x3a\xb8\xf6\xe7\xcc\xdd\x8a\xbb\x61\xfd\x64\x7f\xcf\xcd\x15\x56\x79\x5b\xdb\x50\x23\x5e\x32\x2b\xdd\xb2\x49\xd2\x7d\x94\x53\xb3\xb1\x6e\x2d\xf8\xc3\xc2\xd4\x7d\xc2\x4f\x14\x27\x07\x7b\xe0\x3e\xc7\xb0\x86\xc0\xea\x29\x24\xbf\xba\x37\x60\x73\xa3\x51\x14\x05\xaa\x0a\x4f\xc3\x3a\xf3\xfd\x4f\xd0\xf3\x37\xc3\x21\x11\xd1\xfd\x10\x1e\x85\xed\xfe\xb6\x5a\x5b\xd7\x03\x57\xc9\xa8\x95\xf8\xd0\x60\x61\xb1\x84\x9e\x09\xa9\x29\x85\x3f\xdc\x8c\xc6\xb0\x76\xa6\xba\x60\xd0\xf7\xf2\x21\x09\xc5\x12\x8b\x55\xb2\xdf\xa3\x47\x07\xfa\xe9\xde\x4c\x50\xee\xdd\x4d\x7b\xcf\xbc\xef\xd8\x43\xdc\x8d\x81\x41\x7c\x2b\xee\x60\xe0\x71\x6b\xba\xf0\xb9\x26\xef\x9c\xa8\x10\xa6\x80\xbf\x32\xc0\x02\x00\xd3\xb3\xb7\x21\xae\xaf\x1c\x4e\xf0\xa9\xe8\xca\xff\xf8\xf6\xce\x65\x10\x13\x42\xcf\xfe\x44\xb2\x41\x07\x89\x86\x60\x7d\x6a\x5c\x4b\xee\xad\x4f\x26\x30\x93\xf7\x6a\xc5\x0d\x3e\xe4\x85\x6d\xf3\x1a\x54\x83\xda\x9d\x54\x39\x0e\xe0\xde\xc9\x6e\xf2\xed\xa9\xa1\x58\xe6\x42\x66\xce\x90\xcf\xf5\x60\x6c\xfa\x89\x3a\x2a\x57\xbc\xc7\xe7\xa6\x37\x87\x54\xf8\x89\xe7\x27\xe9\xc2\xa5\xb5\x3b\x78\x6b\xaf\x9e\xae\xa2\xdf\x37\x61\x6d\x6e\xdf\xff\xd9\x42\xd4\x6b\x91\x13\x12\xd6\x77\x68\x9e\xae\x07\x8f\xd4\x9b\x80\x9e\x5e\x66\xfb\x1d\xdb\xb6\x53\x2a\x49\xcd\x1a\xbd\xd1\xfd\x03\xf9\xdf\x0c\x7c\xd1\xff\x7c\xe6\x0b\xdc\xd2\x8f\x7d\xd1\x4b\x73\x57\xb4\x69\x71\x28\x0d\xc3\xf9\x6f\x8f\xa8\xfa\x29\x30\x54\xda\xc1\x41\x70\x50\x93\xc7\xc6\xc1\xd7\x44\xd6\x1d\x8c\x62\xe7\x6b\x00\x40\xcf\x03\x34\x20\xf6\x3d\x63\xff\x30\x50\x81\x07\x5a\x58\x2a\xb5\x32\x29\x9c\xc1\xdb\xf7\x20\xe0\xc7\x29\x9c\xbf\x07\x71\x76\xb6\xe1\xcd\x01\x85\xb0\xec\xad\xb8\x23\x76\x48\xc3\xa4\x1a\x6d\xe8\xe0\xce\x91\x03\xf5\x20\x89\x18\x43\x61\x1f\x52\xfe\x35\x40\x54\xdb\x9c\xd2\xf7\x81\x34\x6b\x8f\x03\x35\xf6\x76\xce\x7b\x52\x39\x58\xad\x3d\xa7\x9c\x0f\x18\x65\xbf\x24\xf7\x8b\xa1\xe3\x60\x86\x39\xea\x27\x68\xdf\x8c\xfc\xe6\x7e\x49\x5b\x21\x7f\x1b\xc3\xbc\xb5\xd0\xe4\x52\x14\xc6\x81\xdb\x71\x25\xa8\xa2\x68\xb5\xf9\x5d\x7d\xc8\x6f\x87\x1b\x91\x9d\xc6\x80\xe7\xed\x3e\x21\xbb\x07\x0f\xfd\xcc\xe6\xc7\xa1\xc1\x79\x39\x4c\xa6\x99\xe1\x29\xef\xe3\x6e\xd0\xe9\xfd\x27\x00\x00\xff\xff\xb3\x76\x36\xee\x77\x14\x00\x00") +var _templateDialectSqlCreateTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x58\xff\x6f\xdb\xba\x11\xff\x59\xfa\x2b\xee\x19\x59\x21\x65\x8e\x9c\x76\xc3\x80\xa5\xf3\x03\xda\xa4\xd9\x8c\xb7\xd7\x0d\x48\xfa\xf0\xb0\x20\x28\x14\xe9\x64\x13\x96\x49\x95\xa4\xd2\x04\x81\xfe\xf7\xe1\x8e\xa4\x2c\x7f\x89\x93\x02\xdb\x0f\x6d\x6c\xf2\xbe\xf1\xf8\xb9\x0f\xef\xfc\xf4\x34\x39\x8e\xcf\x55\xf3\xa8\xc5\x7c\x61\xe1\xdd\xe9\xdb\xbf\x9e\x34\x1a\x0d\x4a\x0b\x97\x79\x81\x77\x4a\x2d\x61\x26\x8b\x0c\x3e\xd4\x35\xb0\x90\x01\xda\xd7\xf7\x58\x66\xf1\xf5\x42\x18\x30\xaa\xd5\x05\x42\xa1\x4a\x04\x61\xa0\x16\x05\x4a\x83\x25\xb4\xb2\x44\x0d\x76\x81\xf0\xa1\xc9\x8b\x05\xc2\xbb\xec\x34\xec\x42\xa5\x5a\x59\xc6\x42\xf2\xfe\x3f\x67\xe7\x9f\x3e\x5f\x7d\x82\x4a\xd4\x08\x7e\x4d\x2b\x65\xa1\x14\x1a\x0b\xab\xf4\x23\xa8\x0a\xec\xc0\x99\xd5\x88\x59\x7c\x3c\xe9\xba\x38\xa6\x33\xc0\x5c\xd9\xc7\x06\xcf\x00\xa5\x9d\xab\x4c\xa8\x09\x4a\x4b\xff\x8a\xc9\x1c\x65\x46\x7b\x57\x85\x6a\x10\x82\x0a\x94\x58\x09\x89\x30\x2a\x45\x5e\x63\x61\x27\xe6\x5b\x3d\x29\x34\xe6\x16\x47\xd0\x75\x24\x71\x74\xd7\x8a\x9a\x8e\x70\x36\x85\x26\x37\x45\x5e\xc3\x51\xc6\x56\xb2\x8f\x7e\xc7\x0b\x6a\x2c\x50\xdc\x3b\xc9\xfe\x73\xaf\xee\x85\x56\xad\xcd\xad\x50\x92\xcd\x69\x21\xed\x40\x6f\x94\x85\xdd\x11\x90\x7c\x5c\xb5\xb2\x80\x64\xc3\x76\xd7\xc1\xf1\x30\xaa\xae\x4b\xc1\x7c\xab\xaf\xf2\x7b\x4c\x0a\xfb\x00\x85\x92\x16\x1f\x6c\x76\xee\xfe\xa6\x90\xb0\x78\xf6\x39\x5f\x21\x74\xdd\x18\x50\x6b\xa5\x53\x78\x8a\xa3\xaf\x52\x95\x38\x86\xaf\xa6\xc1\x82\xc2\xd9\xf2\x93\xb9\x3c\x5c\x35\x58\x24\x69\x1c\x89\x8a\x54\x49\xce\x7c\xab\xe7\x3a\x6f\x16\xd9\x39\x0b\x7c\x56\x25\xbb\x1e\xef\x18\x28\x35\x7d\xf2\x1e\xd2\xf7\xac\xff\xd3\x14\xa4\xa8\xc9\x3d\x59\xec\x4d\xcd\xcc\xb9\x92\xc6\xea\x5c\x48\xfb\x89\x22\x4c\x50\xbb\x28\xa3\x88\xd4\xa6\xf0\x66\x4b\xe0\x09\xb5\xce\x9c\x68\xca\xa7\xea\xe2\x28\xa2\x7f\x1a\x6d\xab\x25\x79\xe1\xe5\x98\x16\x9f\x9e\x4e\x40\x54\x90\xcb\x12\x8e\xb2\xd9\x45\xf6\xc5\xa0\xbe\xe0\xab\x2f\x21\x51\xda\x2d\xce\xcc\x95\xd5\x42\xce\xc3\xb7\x2f\x5f\x66\x17\xe1\xf3\xc7\x47\x8b\x26\xa5\x4b\x89\xd8\xd8\xe4\x18\x2e\x14\x48\x65\x17\x42\xce\xc7\x70\x87\x45\xde\x1a\x24\xc8\x1a\x84\x3f\x01\x21\xcd\xc0\xaa\x35\x16\xee\x10\x4c\xdb\x34\xb5\xc0\x12\xee\x1e\x19\xd4\xad\x41\x9d\xc1\xf1\x04\x4e\x3a\x1f\x1b\xd6\x06\xd7\xc6\x45\xb5\x1b\x25\x6f\x52\xca\xf8\xd6\xb2\xd9\x05\x4c\xa7\x70\xca\x09\x62\x03\xb2\x17\x29\xe9\x8e\x38\xe5\x64\xe3\xb7\xbc\x6e\x31\x4b\x84\xb4\x7f\xf9\x73\x4a\xfb\x6b\x7d\xbe\x2f\x92\xb9\x7e\x6c\xc8\x7b\x22\xca\xf4\xc5\x08\xba\x2d\x87\xc3\xcf\x3e\xf3\x1e\x57\x52\xd4\xf1\xeb\x31\x3c\x04\xdb\x0e\x66\x8f\xb7\x20\x47\x62\x0c\x8e\xfb\x5c\x43\x12\xfb\x43\x11\x48\x86\x7a\x4f\x85\x92\x95\x98\x9f\xed\x02\x9b\xd7\xe9\x24\x0e\xfb\x53\x78\xb3\xc7\x01\x63\xef\x3a\xbf\xab\xd1\x59\xc8\xfe\x9d\x17\xcb\x7c\x4e\x96\x33\x5e\x1e\x93\xc0\xec\xe2\x6c\xa0\x7d\x29\xb0\x2e\x7b\xe5\xe8\x9a\xc9\xa8\xa2\xc5\x6c\x98\xec\x8c\xb1\x1c\x8e\xc7\xa2\xe7\xaa\x6e\x57\x72\xd7\x53\x50\x63\x8d\x5c\xda\xa0\xc0\xff\x77\x71\x94\xc6\x01\x8f\x1f\xea\x5a\x7d\x07\xc7\x20\x72\xce\x40\xdb\x73\x2a\xc2\x20\xd1\x3a\x3e\x58\x94\x46\x28\x69\x40\x69\x46\x24\x58\x5c\x35\x75\x6e\xd1\x64\x4c\x8f\x6c\xf7\xbb\xb0\x0b\x38\xb2\xab\xa6\x36\x04\xab\x55\x6e\x8b\xc5\xb5\x97\xdb\xc7\x9a\x13\x4a\xe8\xe4\x78\xb4\x06\xb3\xce\xe5\x1c\x9d\x09\xb2\xe0\x6d\x39\x30\xd1\xfe\x43\x70\xeb\x65\x8e\xd6\xaa\xfb\x30\x76\x10\x9d\xa2\x02\x51\x8e\x41\x2d\x03\x9d\xf5\x6c\x3b\xc8\xe4\xaf\x7e\xed\xef\x48\xc9\x4c\xd2\xf7\x24\xff\xb4\x55\x1a\xa2\xe4\x85\x8d\x2a\x0a\xcb\x7b\x22\xf2\x87\xac\xf8\x84\xbd\x07\x46\x83\xe9\x43\xbb\x27\x23\x87\xa2\xab\x0e\xc5\xc6\xa1\x78\x8b\x53\xc8\x9b\x06\x65\x99\x0c\x57\xc7\xaf\xc7\x61\xf5\x1c\x0a\xf9\x9c\x67\x3e\xd2\x17\x71\x59\xed\xa2\x72\x40\x31\x4e\xe2\xca\xea\xb6\xb0\x1c\x0f\xd5\x3d\x1f\x9c\xee\xaf\xca\x3e\x8b\xba\xa6\x32\x72\xb9\xed\x3a\xaa\x5d\x97\x53\x76\x7f\x30\xd1\xe8\x12\xfd\xa9\x9c\xe3\x3a\xbf\xe4\xd5\x3c\x97\x5b\xdc\x8a\x64\x76\x61\x28\xbd\x35\xca\x84\xf5\x52\xf8\xd9\xd3\xe9\x1a\xf7\x5c\x23\x25\x1c\xc1\x88\x1c\x8d\xc8\xed\x88\x5e\x3b\x33\x02\xab\x5b\x84\xd1\x7f\x50\xab\x11\x8c\xa4\xa8\x3d\xe0\x49\xb9\xaf\xa3\xcd\xfa\x28\xb1\x42\xb6\x92\x11\x35\x51\xb3\x52\x7a\xe8\x0a\x49\x85\x3a\x69\x9b\x32\xb7\x98\x71\x11\xb8\x02\xdc\xa6\xf6\x80\x7d\xcc\xfe\xf5\x5d\x5e\xfe\xb2\x76\x79\x02\x47\x15\xa3\xea\x08\xb3\x4b\xa5\x51\xcc\xe5\x2f\xf8\x18\xf6\x07\xd7\xb1\x7c\xfe\x3e\x96\x0e\x34\x07\xae\x85\xf3\x74\x73\x7a\xbb\x1b\x98\x83\xa1\xbb\x8d\x2d\x6c\xf2\xe2\x18\xe8\xe8\xe9\xee\x95\x6e\xbe\x18\xac\x11\xbb\xc6\xcc\x4b\x1c\xee\xd1\xbe\xde\xb5\xf5\xf2\xff\xd0\xa8\xc5\x93\x09\x50\x47\xe5\x5f\x25\xc3\x64\x3a\x7c\x5a\x88\x42\x85\x15\x68\x42\x9f\x5a\xe6\x36\xbf\xcb\x0d\x66\xaf\x7d\xef\x0e\x34\x6c\x37\xb7\xcf\xb6\x6c\x94\x20\x4f\xc4\x4b\x24\xc1\x3d\x0c\x3f\x66\x50\x6f\xbf\x79\xde\xb7\x49\xd3\x38\xea\x0b\x25\x58\xd9\x74\xf7\x92\x3a\x97\x96\xd2\x43\x0b\xbf\xba\xa5\x97\x75\x2b\xa5\x41\x70\xde\xb9\x90\x9f\x13\xe5\x42\xa4\x4c\x26\x02\x84\xb4\x63\x37\x07\xec\xa4\x8a\xcb\x75\x70\xed\xcf\x99\xbb\x11\xb7\xc3\xfa\xc9\xfe\x91\x9b\x0b\xac\xf2\xb6\xb6\xa1\x46\xbc\x64\x56\xba\x65\x93\xa4\xbb\x28\xa7\x66\x63\xd5\x5a\xf0\x87\x85\xa9\xfb\x84\x97\x14\x27\x07\xbb\xe7\x3e\xc7\xb0\x82\xc0\xea\x29\x24\xbf\xb9\x37\x60\x7d\xa3\x51\x14\x05\xaa\x0a\x4f\xc3\x2a\xf3\xfd\x4f\xd0\xf3\x37\xc3\x21\x11\xd1\xfd\x14\x1e\x85\xcd\x66\xb7\x5a\x59\xd7\x10\x57\xc9\xa8\x95\xf8\xd0\x60\x61\xb1\x84\x9e\x09\xa9\x29\x85\x3f\x5c\x8f\xc6\xb0\x72\xa6\xba\x60\xd0\x37\xf6\x21\x09\xc5\x02\x8b\x65\xb2\xdb\xb0\x47\x7b\x9a\xeb\xde\x4c\x50\xee\xdd\x4d\x7b\xcf\xbc\xef\xd8\x43\xdc\x8e\x81\x41\x7c\x23\x6e\x61\xe0\x71\x63\xd4\xf0\xb9\x26\xef\x9c\xa8\x10\xa6\x80\xbf\x31\xc0\x02\x00\xd3\x93\xb7\x21\xae\xaf\x1c\x4e\xf0\xa9\xe8\xca\xff\xf8\xf6\xd6\x65\x10\x13\x42\xcf\xee\x78\xb2\x46\x07\x89\x86\x60\x7d\x6a\x5c\x4b\xee\xad\x4f\x26\x30\x93\xf7\x6a\xc9\x0d\x3e\xe4\x85\x6d\xf3\x1a\x54\x83\xda\x9d\x54\x39\x0e\xe0\xde\xc9\xae\xf3\xed\xa9\xa1\x58\xe4\x42\x66\xce\x90\xcf\xf5\x60\x86\xfa\x48\x1d\x95\x2b\xde\xc3\x43\xd4\x9b\x7d\x2a\xfc\xc4\xf3\x93\x74\xe6\xd2\xda\xed\xbd\xb5\x57\x8f\x5a\xd1\x8f\x8d\x5b\xeb\xdb\xf7\x7f\x36\x10\xf5\x5a\xe4\x84\x84\xf5\x1d\x9a\xa7\xeb\xc1\x23\xf5\x26\xa0\xa7\x97\xd9\x7c\xc7\x36\xed\x94\x4a\x52\xb3\x46\x6f\x74\xff\x40\xfe\xcf\xa6\xbf\xe8\x15\x03\xe0\xbb\x1f\x1a\x00\x03\xd1\xf4\x33\x60\xf4\xd2\x10\x16\xad\xfb\x1d\xca\xc9\x70\x18\xdc\x61\xad\x7e\x24\x0c\x65\xb7\x77\x2a\x1c\x14\xe8\xa1\xd9\xf0\x35\x91\x75\x7b\xa3\xd8\xfa\x1a\xd0\xd0\x93\x02\x4d\x8b\x7d\x03\xd9\xbf\x12\x54\xed\x81\x23\x16\x4a\x2d\x4d\x0a\x27\xf0\xf6\x3d\x08\xf8\x79\x0a\xa7\xef\x41\x9c\x9c\xac\x49\x74\xc0\x27\x2c\x7b\x23\x6e\x89\x2a\xd2\x30\xb6\x46\x6b\x6e\xb8\x75\x4c\x41\x0d\x49\x22\xc6\x50\xd8\x87\x94\x7f\x27\x10\xd5\x26\xc1\xf4\x4d\x21\x0d\xde\xe3\xc0\x93\xbd\x9d\xd3\x9e\x61\xf6\x96\x6e\x4f\x30\xa7\x03\x7a\xd9\xad\xcf\xdd\xca\xe8\x38\x98\x61\x8e\xfa\x71\xda\x77\x26\xbf\xbb\xdf\xd8\x96\xc8\xdf\xc6\x70\xd7\x5a\x68\x72\x29\x0a\xe3\x90\xee\x88\x13\x54\x51\xb4\xda\xfc\x50\x53\xf2\xfb\xfe\xae\x64\xab\x4b\xe0\xe1\xbb\x4f\xc8\xf6\xc1\x43\x73\xb3\xfe\xd9\x68\x70\x5e\x0e\x93\x39\x67\x78\xca\xfb\xb8\x1b\xb4\x7d\xff\x0d\x00\x00\xff\xff\x87\x77\x26\x1d\x91\x14\x00\x00") func templateDialectSqlCreateTmplBytes() ([]byte, error) { return bindataRead( @@ -647,12 +647,12 @@ func templateDialectSqlCreateTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/sql/create.tmpl", size: 5239, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/dialect/sql/create.tmpl", size: 5265, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _templateDialectSqlDecodeTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x58\xdb\x6e\xdb\xb8\x16\x7d\xb6\xbe\x62\x57\x48\x0a\x2b\x70\xe4\x9c\xe2\xe0\x00\x27\x1d\x0f\x50\xf4\x02\x78\x3a\xc8\x14\x49\xd3\x97\x20\x0f\xac\xb4\x69\xb3\x91\x48\x87\xa4\x9b\x04\x82\xfe\x7d\xc0\x9b\x4c\xc9\x76\x2e\x33\x28\x30\x53\x54\xe4\xe6\xbe\xae\xb5\x48\xb7\x69\xa6\x47\xc9\x7b\xb1\x7a\x90\x6c\xb1\xd4\xf0\xe6\xe4\x3f\xff\x3f\x5e\x49\x54\xc8\x35\x7c\x22\x05\x7e\x17\xe2\x06\xe6\xbc\xc8\xe1\x5d\x55\x81\x35\x52\x60\xf6\xe5\x4f\x2c\xf3\xe4\xeb\x92\x29\x50\x62\x2d\x0b\x84\x42\x94\x08\x4c\x41\xc5\x0a\xe4\x0a\x4b\x58\xf3\x12\x25\xe8\x25\xc2\xbb\x15\x29\x96\x08\x6f\xf2\x93\xb0\x0b\x54\xac\x79\x99\x30\x6e\xf7\xff\x9c\xbf\xff\x78\x76\xf1\x11\x28\xab\x10\xfc\x9a\x14\x42\x43\xc9\x24\x16\x5a\xc8\x07\x10\x14\x74\x14\x4c\x4b\xc4\x3c\x39\x9a\xb6\x6d\x92\x98\x1a\x60\x21\xf4\xc3\x0a\x4f\x01\xb9\x5e\x88\x9c\x89\x29\x72\x6d\xfe\x2f\xa6\x0b\xe4\xb9\xd9\xbb\x28\xc4\x0a\x21\x1c\x81\x12\x29\xe3\x08\x69\xc9\x48\x85\x85\x9e\xaa\xdb\x6a\x5a\xa2\x29\x62\x2a\x38\xa6\xd0\xb6\xc6\xea\x40\x62\x81\xec\x27\x4a\x38\x9d\xc1\x41\x7e\x1e\xbe\xbc\x93\x03\x56\xaa\x82\x70\xe3\xde\x19\xcc\x3f\xe4\x67\x78\x77\x51\x10\xfe\xd5\xac\xb5\x6d\xd3\x00\xa3\xc0\x85\x76\x9b\x97\x0a\xe5\x07\x1b\xb9\x74\x9b\xb1\x87\x19\xa4\x1c\xef\xc6\xea\xb6\xca\xcf\xd6\x55\x35\xe7\xfa\x7f\xff\xcd\x52\x67\x87\xbc\x0c\x29\x15\xc6\x58\x99\x78\x25\x2b\x74\xcf\xc3\xb8\x62\xca\x47\x7a\x2f\xb8\xd2\x84\xeb\xcc\x1f\x93\x84\x2f\x10\x0e\xa8\xcb\xf3\x13\xc3\xaa\x54\x66\x6b\x64\x5c\x72\x52\x3b\x8f\xf6\xbc\x5f\x65\x14\x96\x44\x7d\xc6\x87\x2e\xe4\x01\x1d\x54\x97\x8c\xa2\xe3\x33\x58\xa0\x7e\xcc\x76\x53\x46\xef\x14\x59\xad\xcc\xb2\xff\x3e\xa0\x5d\xea\x9d\xa5\x77\x39\x03\xb5\x3f\x80\x3f\xee\x8a\xf5\x61\x92\xe9\x14\x4c\x6f\xbe\x91\x6a\x8d\x06\xb7\x7a\x2d\xb9\xb2\xf0\x72\x3e\xa8\x90\xd6\x80\x33\xbe\x80\x9f\xce\x8a\x4a\x51\x83\x99\xc1\xb9\xb8\x53\x79\x42\xd7\xbc\x80\xf1\x91\x49\x23\x3f\x23\xb5\xa9\x24\x8b\x9c\x8e\x0b\x51\xad\x6b\xae\xe0\xea\x5a\x69\xc9\xf8\x22\x83\xf1\xd5\x35\xe3\x1a\x25\x25\x05\x36\xed\x04\x50\x4a\x21\x33\x68\x92\x91\x8f\x70\x3a\x83\x9a\xdc\xe0\xd0\xae\x42\x1e\xbc\x65\x59\x32\x32\xb9\x31\x63\xeb\x26\x17\xe2\x34\xc9\x68\xa4\xee\x98\x2e\x96\x61\xe9\x8a\x5d\xdb\xd5\x51\xd3\x1c\x87\x31\x9b\xf2\x26\x70\x10\x0e\x99\x99\xfb\xb6\xd9\xa1\x8d\x46\x05\x51\x08\x1b\x58\x30\x63\xec\xcc\xfc\x91\x0e\xba\x66\x17\x4e\xa0\x6d\x27\x5d\x63\x6d\x33\xbe\x90\xe2\x86\x2c\x4c\x3f\x72\x3b\xa3\x18\xa7\xa7\x36\x86\xaf\xd7\xe4\x37\x33\xb1\x6c\x56\x3e\x01\x93\x6b\x00\x43\x2f\x73\x93\x09\xbd\x71\x28\xbd\xe4\x78\xbf\x12\x52\x63\xf9\x49\x48\x64\x0b\xfe\x19\x1f\xba\x0a\xcc\x19\x0f\x67\x7a\xe3\x00\x3d\x2c\xae\x97\x64\xe4\xe2\xca\x12\x0f\xda\xf6\xfa\x14\xa6\x53\x6b\x49\xc3\x70\x77\x66\x1e\x28\x4c\x07\x04\xde\xa6\xab\x69\x41\xa5\x3c\xf3\xb7\x38\x10\x31\x60\xd8\x82\x12\x29\x59\x57\xda\x75\xce\x21\x15\x38\xab\x26\x40\x6b\x9d\x7f\x34\x10\xa2\xe3\x74\x6d\x1a\x82\x85\xc6\xd2\x0f\x1f\x0e\x6f\x2d\x88\x6d\x67\x63\x8c\xa6\x93\x08\x1e\x59\x32\x1a\xb5\x89\xf9\xcf\x3b\x76\xe5\x4d\x4c\x80\xc4\xd1\x84\x28\xc5\x16\x81\x28\xee\xc3\x11\xc5\x63\x56\x2f\x89\x86\x3b\x94\xe8\x59\x84\x65\x9f\x28\x30\x26\x54\xe3\x86\x4d\x99\x71\xaa\x85\x75\x11\xe7\x05\xd4\x2a\x4f\xe0\x55\x4f\x62\xdb\x16\x06\x3c\x8b\xb3\xda\x62\xda\x24\xe4\xd6\xe3\x51\xe6\xf8\x66\x18\xc1\x28\xd4\x13\xe0\x56\xd7\x90\x8f\x9d\x75\xd6\x27\xda\x5b\xa8\xe1\x37\xe0\x96\x40\xbe\x39\x71\xc3\x6b\xa6\x6a\x62\xb8\xc6\xd7\xf5\x77\x94\xe6\x1a\x32\x15\xfa\xc8\xa7\x70\x58\xc2\xab\x19\x1c\x96\xe9\xc4\x86\xca\x6c\x93\x2d\x32\x59\x79\x6f\x02\xa7\x2c\xed\xa8\x84\xb7\x6e\x39\xae\xd8\x5d\x01\xf7\x46\xfb\x7f\xf4\xa5\xde\x0a\x40\xd8\x6e\xdb\x67\x29\xc1\xc6\xdc\x49\xc2\x4e\x22\xd8\xef\xe8\x86\x08\x7c\x35\x69\x33\x0a\xc4\x68\xf1\xf0\xae\x1a\x0b\xe9\x16\xe7\xea\xc2\x36\x3f\x7c\x5d\x5e\xce\x3f\x64\x31\x25\xef\x98\x5e\x02\xde\x6b\x2b\xe9\x90\xce\xcb\xfb\xd4\xe5\x94\x5a\x8a\xa6\xf6\x20\xa4\xe7\x58\xa4\xbd\x46\x38\xde\x35\x0d\x68\xac\x57\x15\xd1\xbb\xaf\x66\xea\x7c\xe4\x71\xc4\x01\xa3\x1c\xfb\x92\x8e\xc5\x13\x10\x56\x4e\x3c\xa5\xa3\x16\xe5\xe3\xa3\x3e\x79\xed\x21\x46\xe1\x95\xb8\x71\x8a\xba\x13\x13\x11\x09\x2d\xed\x0e\xbf\x5a\x0a\xda\xd4\x80\x19\x28\xd8\x50\xce\x5b\x48\xb3\x57\xab\xe9\x80\x53\x44\xd3\x44\xaf\x0d\x0e\x9f\xf9\x26\x93\x5e\x6d\x1b\x85\xdc\x75\x87\x3f\x32\x69\xba\x35\xe7\x67\x8e\x89\xfe\x9a\x21\xed\xa9\xea\xd9\xba\xbf\x5f\xf6\x43\x0b\x18\xb5\x5b\xdb\x4f\xad\x27\x48\xd0\x97\xee\x27\xaf\x8e\xc1\x65\xe7\xd9\x63\x78\x32\x08\x3e\xb6\x8c\xa2\xdb\x7c\xa2\x11\x9b\x68\xe0\x52\x16\xb5\xf9\x9f\x8d\x29\xbd\xd0\x72\x5d\xe8\xce\xe0\x26\x8f\x16\x3a\xef\x2f\x9e\xe2\x80\x6b\x5b\x64\x33\xc4\x79\x29\xe1\xde\xc6\x54\x7b\x01\xd7\xb0\x5c\xe0\xb1\x23\xdc\xe6\xf2\xb6\x97\x5e\x44\xbd\x51\xeb\xf2\x0b\x79\xe5\xdf\x48\xc5\xca\x2e\xda\x90\x93\xd6\xd1\xb0\x57\x30\x03\x73\xc7\xbb\x20\x9e\xa8\xd9\xc6\x41\x90\x4b\x9a\x9f\xb1\xaa\x22\xdf\x2b\x84\xb1\x7f\x28\x18\xe3\x6e\xd5\x0c\xf5\xa8\xf7\x7c\x7a\x4e\xe4\x5e\xd4\x2d\x79\xd8\x68\xcb\x3e\x76\xf5\xae\x7c\x77\xd5\x47\x6f\xe3\xc7\x7f\x03\xf9\xe9\xb7\xdd\x75\xe6\x98\x69\x7f\x44\xe5\xf3\xf2\x1e\x8e\xbb\x2d\x1a\x6f\xb9\xf4\x37\x9b\x12\x75\xbc\x7d\x8e\x45\x7c\xd2\x1a\x5b\x2a\x0f\xaa\x6f\x1a\x07\xfd\x70\x6e\x6b\xd7\x9f\x9d\x59\x7c\xfa\xaa\x3a\xc7\x56\x01\xf2\xb9\xfa\xe3\xe2\xaf\x33\xb7\xfa\x28\x38\x3d\x34\x5d\xbb\xa3\xd7\x5a\x0c\xcf\x97\xde\x03\xbd\x37\x65\xc0\x65\x14\xcf\x3e\xc9\xfa\xf8\x34\x2f\x09\xce\x2a\x78\xfd\xda\xbe\x50\x8e\x1c\x94\xe1\x77\x38\x71\x29\x98\x17\x84\xb4\x3f\x44\x7f\x28\xc1\xf3\x4b\x5e\x13\xa9\x96\xa4\xf2\x96\x13\x78\xed\x80\xa5\x3b\x4c\xf9\x76\x65\x6f\xed\x41\xef\xbe\x49\xf6\x72\xcd\x3b\xdc\x55\xc2\x29\x1c\xde\xa5\xf6\xb7\x8c\x05\x9f\x87\x57\x5f\x03\xec\x4c\x7b\xbf\x87\xa3\x76\xbe\x68\x0c\x9d\x93\x5f\x3f\x04\x8f\x97\x25\x51\x5f\x24\x52\x76\x1f\x05\x4f\x83\x58\xa5\x5e\xe3\x1e\x13\x94\x0d\xee\x02\xe9\xed\xb3\x35\xbe\x34\x77\xcd\xe6\x11\x81\x39\xda\x7f\xa4\x0f\x55\x47\x8b\xd4\xe6\x94\xee\x95\xe7\x7f\xef\xad\x27\x32\x1b\xd7\x7b\x60\xdc\x24\x4f\x46\xf5\xf2\x19\x24\x73\xa3\x96\x3d\x11\x3d\xb7\x7f\xce\xd5\x17\x2d\xfb\x3a\x6a\xc3\xed\x10\xbd\xe8\x3b\xfa\xeb\x13\x82\x57\x13\xfe\x90\xf6\xff\xf9\xe0\xef\x00\x00\x00\xff\xff\x3a\x11\xe6\x0d\x1d\x13\x00\x00") +var _templateDialectSqlDecodeTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x58\x5b\x6f\xdb\x38\x16\x7e\xb6\x7e\xc5\xa9\x90\x14\x56\xe0\xc8\xd9\x62\xb1\xc0\xa6\xeb\x05\x3a\xbd\x00\x9e\x0e\x32\x45\xd2\xf4\x25\xc8\x03\x2b\x1d\xda\x6c\x24\xd2\x21\xe9\x26\x81\xa0\xff\x3e\xe0\x4d\xa6\x64\x3b\x97\x19\x14\x98\x19\x44\xe4\xe1\xb9\x7e\xdf\x47\x7a\x9a\x66\x7a\x94\xbc\x17\xab\x07\xc9\x16\x4b\x0d\x6f\x4e\xfe\xf5\xdf\xe3\x95\x44\x85\x5c\xc3\x27\x52\xe0\x77\x21\x6e\x60\xce\x8b\x1c\xde\x55\x15\x58\x23\x05\x66\x5f\xfe\xc4\x32\x4f\xbe\x2e\x99\x02\x25\xd6\xb2\x40\x28\x44\x89\xc0\x14\x54\xac\x40\xae\xb0\x84\x35\x2f\x51\x82\x5e\x22\xbc\x5b\x91\x62\x89\xf0\x26\x3f\x09\xbb\x40\xc5\x9a\x97\x09\xe3\x76\xff\x8f\xf9\xfb\x8f\x67\x17\x1f\x81\xb2\x0a\xc1\xaf\x49\x21\x34\x94\x4c\x62\xa1\x85\x7c\x00\x41\x41\x47\xc1\xb4\x44\xcc\x93\xa3\x69\xdb\x26\x89\xa9\x01\x16\x42\x3f\xac\xf0\x14\x90\xeb\x85\xc8\x99\x98\x22\xd7\xe6\xdf\x62\xba\x40\x9e\x9b\xbd\x8b\x42\xac\x10\xc2\x11\x28\x91\x32\x8e\x90\x96\x8c\x54\x58\xe8\xa9\xba\xad\xa6\x25\x9a\x22\xa6\x82\x63\x0a\x6d\x6b\xac\x0e\x24\x16\xc8\x7e\xa2\x84\xd3\x19\x1c\xe4\xe7\xe1\xcb\x3b\x39\x60\xa5\x2a\x08\x37\xee\x9d\xc1\xfc\x43\x7e\x86\x77\x17\x05\xe1\x5f\xcd\x5a\xdb\x36\x0d\x30\x0a\x5c\x68\xb7\x79\xa9\x50\x7e\xb0\x91\x4b\xb7\x19\x7b\x98\x41\xca\xf1\x6e\xac\x6e\xab\xfc\x6c\x5d\x55\x73\xae\xff\xf3\xef\x2c\x75\x76\xc8\xcb\x90\x52\x61\x8c\x95\x89\x57\xb2\x42\xf7\x3c\x8c\x2b\xa6\x7c\xa4\xf7\x82\x2b\x4d\xb8\xce\xfc\x31\x49\xf8\x02\xe1\x80\xba\x3c\x3f\x31\xac\x4a\x65\xb6\x46\xc6\x25\x27\xb5\xf3\x68\xcf\xfb\x55\x46\x61\x49\xd4\x67\x7c\xe8\x42\x1e\xd0\x41\x75\xc9\x28\x3a\x3e\x83\x05\xea\xc7\x6c\x37\x65\xf4\x4e\x91\xd5\xca\x2c\xfb\xef\x03\xda\xa5\xde\x59\x7a\x97\x33\x50\xfb\x03\xf8\xe3\xae\x58\x1f\x26\x99\x4e\xc1\xf4\xe6\x1b\xa9\xd6\x68\x70\xab\xd7\x92\x2b\x0b\x2f\xe7\x83\x0a\x69\x0d\x38\xe3\x0b\xf8\xe9\xac\xa8\x14\x35\x98\x19\x9c\x8b\x3b\x95\x27\x74\xcd\x0b\x18\x1f\x99\x34\xf2\x33\x52\x9b\x4a\xb2\xc8\xe9\xb8\x10\xd5\xba\xe6\x0a\xae\xae\x95\x96\x8c\x2f\x32\x18\x5f\x5d\x33\xae\x51\x52\x52\x60\xd3\x4e\x00\xa5\x14\x32\x83\x26\x19\xf9\x08\xa7\x33\xa8\xc9\x0d\x0e\xed\x2a\xe4\xc1\x5b\x96\x25\x23\x93\x1b\x33\xb6\x6e\x72\x21\x4e\x93\x8c\x46\xea\x8e\xe9\x62\x19\x96\xae\xd8\xb5\x5d\x1d\x35\xcd\x71\x18\xb3\x29\x6f\x02\x07\xe1\x90\x99\xb9\x6f\x9b\x1d\xda\x68\x54\x10\x85\xb0\x81\x05\x33\xc6\xce\xcc\x1f\xe9\xa0\x6b\x76\xe1\x04\xda\x76\xd2\x35\xd6\x36\xe3\x0b\x29\x6e\xc8\xc2\xf4\x23\xb7\x33\x8a\x71\x7a\x6a\x63\xf8\x7a\x4d\x7e\x33\x13\xcb\x66\xe5\x13\x30\xb9\x06\x30\xf4\x32\x37\x99\xd0\x1b\x87\xd2\x4b\x8e\xf7\x2b\x21\x35\x96\x9f\x84\x44\xb6\xe0\x9f\xf1\xa1\xab\xc0\x9c\xf1\x70\xa6\x37\x0e\xd0\xc3\xe2\x7a\x49\x46\x2e\xae\x2c\xf1\xa0\x6d\xaf\x4f\x61\x3a\xb5\x96\x34\x0c\x77\x67\xe6\x81\xc2\x74\x40\xe0\x6d\xba\x9a\x16\x54\xca\x33\x7f\x8b\x03\x11\x03\x86\x2d\x28\x91\x92\x75\xa5\x5d\xe7\x1c\x52\x81\xb3\x6a\x02\xb4\xd6\xf9\x47\x03\x21\x3a\x4e\xd7\xa6\x21\x58\x68\x2c\xfd\xf0\xe1\xf0\xd6\x82\xd8\x76\x36\xc6\x68\x3a\x89\xe0\x91\x25\xa3\x51\x9b\x98\x7f\xbc\x63\x57\xde\xc4\x04\x48\x1c\x4d\x88\x52\x6c\x11\x88\xe2\x3e\x1c\x51\x3c\x66\xf5\x92\x68\xb8\x43\x89\x9e\x45\x58\xf6\x89\x02\x63\x42\x35\x6e\xd8\x94\x19\xa7\x5a\x58\x17\x71\x5e\x40\xad\xf2\x04\x5e\xf5\x24\xb6\x6d\x61\xc0\xb3\x38\xab\x2d\xa6\x4d\x42\x6e\x3d\x1e\x65\x8e\x6f\x86\x11\x8c\x42\x3d\x01\x6e\x75\x0d\xf9\xd8\x59\x67\x7d\xa2\xbd\x85\x1a\xfe\x07\xdc\x12\xc8\x37\x27\x6e\x78\xcd\x54\x4d\x0c\xd7\xf8\xba\xfe\x8e\xd2\x5c\x43\xa6\x42\x1f\xf9\x14\x0e\x4b\x78\x35\x83\xc3\x32\x9d\xd8\x50\x99\x6d\xb2\x45\x26\x2b\xef\x4d\xe0\x94\xa5\x1d\x95\xf0\xd6\x2d\xc7\x15\xbb\x2b\xe0\xde\x68\xff\x8f\xbe\xd4\x5b\x01\x08\xdb\x6d\xfb\x2c\x25\xd8\x98\x3b\x49\xd8\x49\x04\xfb\x1d\xdd\x10\x81\xaf\x26\x6d\x46\x81\x18\x2d\x1e\xde\x55\x63\x21\xdd\xe2\x5c\x5d\xd8\xe6\x87\xaf\xcb\xcb\xf9\x87\xf0\xf7\x6f\x0f\x1a\x55\x16\xf3\xf3\x8e\xe9\x25\xe0\xbd\xb6\xfa\x0e\xe9\xbc\xbc\x4f\x5d\x82\xa9\xe5\x6b\x6a\x4f\x42\x7a\x8e\x45\xda\xeb\x8a\x23\x61\xd3\x80\xc6\x7a\x55\x11\xbd\xfb\x9e\xa6\xce\x47\x1e\x47\x1c\xd0\xcb\x51\x31\xe9\x28\x3d\x01\x61\xb5\xc5\xf3\x3b\xea\x57\x3e\x3e\xea\x33\xd9\x1e\x62\x14\x5e\x89\x1b\x27\xaf\x3b\x01\x12\x31\xd2\x72\xf0\xf0\xab\xe5\xa3\x4d\x0d\x98\xc1\x85\x0d\xe5\xbc\x85\x34\x7b\xb5\x9a\x0e\x38\x79\x34\x5d\xf4\x42\xe1\xc0\x9a\x6f\x32\xe9\xd5\xb6\x91\xcb\x5d\x17\xfa\x23\x63\xa7\x5b\x43\x7f\xe6\x98\xe8\xaf\x19\xd2\x9e\xaa\x9e\x7d\x09\xec\xbf\x03\x42\x0b\x18\xb5\x5b\xdb\xef\xae\x27\x18\xd1\xd7\xf1\x27\xef\x91\xc1\xcd\xe7\xa9\x64\x48\x33\x08\x3e\xb6\xf4\xa2\xdb\xe4\xa2\x11\xb5\xe8\x4e\x62\x65\x51\xcf\xff\xde\xcc\xd2\x0b\x2d\xd7\x85\xee\x0c\x6e\xf2\x68\xa1\xf3\xfe\xe2\x91\x0e\x88\xb7\xc5\x3c\xc3\xa2\x97\xb2\xef\x6d\xcc\xbb\x17\x10\x0f\xcb\x05\x1e\x3b\xf6\x6d\xae\x75\x7b\x1d\x46\x3c\x1c\xb5\x2e\xbf\x90\x57\xfe\x8d\x54\xac\xec\xa2\x0d\x09\x6a\x1d\x0d\x7b\x05\x33\x30\xb7\xbf\x0b\xe2\x59\x9b\x6d\x1c\x04\x21\xa5\xf9\x19\xab\x2a\xf2\xbd\x42\x18\xfb\x27\x84\x31\xee\x56\xcd\x50\x8f\x7a\x0f\xab\xe7\x44\xee\x45\xdd\xd2\x8a\x8d\xd0\xec\xa3\x5a\xef\x31\xe0\x1e\x01\xd1\xab\xf9\xf1\x5f\x47\x7e\xfa\x6d\x77\xd1\x39\x9a\xda\x9f\x57\xf9\xbc\xbc\x87\xe3\x6e\x8b\xc6\x5b\x2e\xfd\xcd\xa6\x44\x1d\x6f\x9f\x63\x11\x9f\xb4\xc6\x96\xd7\x83\xea\x9b\xc6\x41\x3f\x9c\xdb\xda\xf5\x67\x67\x16\x9f\xbe\xaa\xce\xb1\x95\x83\x7c\xae\x7e\xbf\xf8\xf3\xcc\xad\x3e\x0a\x4e\x0f\x4d\xd7\xee\xe8\x1d\x17\xc3\xf3\xa5\x97\x42\xef\xb5\x19\x70\x19\xc5\xb3\x8f\xb5\x3e\x3e\xcd\x1b\x83\xb3\x0a\x5e\xbf\xb6\x6f\x97\x23\x07\x65\xf8\x3f\x9c\xb8\x14\xcc\xdb\x42\xda\x9f\xa8\x3f\x94\xe0\xf9\x25\xaf\x89\x54\x4b\x52\x79\xcb\x09\xbc\x76\xc0\xd2\x1d\xa6\x7c\xbb\xb2\xb7\xf6\xa0\x77\xdf\x24\x7b\xb9\xe6\x1d\xee\x2a\xe1\x14\x0e\xef\x52\xfb\x2b\xc7\x82\xcf\xc3\xab\xaf\x01\x76\xa6\xbd\x5f\xca\x51\x3b\x5f\x34\x86\xce\xc9\xaf\x1f\x82\xc7\xcb\x92\xa8\x2f\x12\x29\xbb\x8f\x82\xa7\x41\xac\x52\xaf\x71\x8f\x09\xca\x06\x77\x81\xf4\xf6\x41\x1b\xdf\xa0\xbb\x66\xf3\x88\xc0\x1c\xed\x3f\xd2\x87\xaa\xa3\x45\x6a\x73\x4a\xf7\xca\xf3\x3f\xf7\xd6\x13\x99\x8d\xeb\x3d\x30\x6e\x92\x27\xa3\x7a\xf9\x0c\x92\xb9\x51\xcb\x9e\x88\x9e\xdb\xff\xce\xd5\x17\x2d\xfb\x3a\x6a\xc3\xed\x10\xbd\xe8\x3b\xfa\xf3\x09\xc1\xab\x09\x7f\x48\xfb\xff\x63\xe1\xaf\x00\x00\x00\xff\xff\x6b\x55\x57\x36\x37\x13\x00\x00") func templateDialectSqlDecodeTmplBytes() ([]byte, error) { return bindataRead( @@ -667,7 +667,7 @@ func templateDialectSqlDecodeTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/dialect/sql/decode.tmpl", size: 4893, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/dialect/sql/decode.tmpl", size: 4919, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/dialect/sql/create.tmpl b/entc/gen/template/dialect/sql/create.tmpl index 993d82562..6cc525d47 100644 --- a/entc/gen/template/dialect/sql/create.tmpl +++ b/entc/gen/template/dialect/sql/create.tmpl @@ -19,8 +19,8 @@ func ({{ $receiver }} *{{ $builder }}) sqlSave(ctx context.Context) (*{{ $.Name } return nil, err } - {{- if and $.ID.UserDefined (or $.ID.IsString $.ID.IsUUID) }} - {{- /* Do nothing, because these 2 types must be supplied by the user. */ -}} + {{- if and $.ID.UserDefined (or $.ID.IsString $.ID.IsUUID $.ID.IsBytes) }} + {{- /* Do nothing, because these 3 types must be supplied by the user. */ -}} {{- else }} {{- if $.ID.UserDefined }} if _node.ID == 0 { @@ -125,7 +125,7 @@ func ({{ $receiver }} *{{ $builder }}) Save(ctx context.Context) ([]*{{ $.Name } } mutation.{{ $.ID.BuilderField }} = &nodes[i].{{ $.ID.StructField }} mutation.done = true - {{- if and $.ID.UserDefined (or $.ID.IsString $.ID.IsUUID) }} + {{- if and $.ID.UserDefined (or $.ID.IsString $.ID.IsUUID $.ID.IsBytes) }} {{- /* Do nothing, because these 2 types must be supplied by the user. */ -}} {{- else }} {{- if $.ID.UserDefined }} diff --git a/entc/gen/template/dialect/sql/decode.tmpl b/entc/gen/template/dialect/sql/decode.tmpl index d4fb9b87e..406d7adca 100644 --- a/entc/gen/template/dialect/sql/decode.tmpl +++ b/entc/gen/template/dialect/sql/decode.tmpl @@ -51,7 +51,7 @@ func ({{ $receiver }} *{{ $.Name }}) assignValues(columns []string, values []int for {{ $idx }} := range columns { switch columns[{{ $idx }}] { case {{ $.Package }}.{{ $.ID.Constant }}: - {{- if and $.ID.UserDefined (or $.ID.IsString $.ID.IsUUID) }} + {{- if and $.ID.UserDefined (or $.ID.IsString $.ID.IsUUID $.ID.IsBytes) }} {{- with extend $ "Idx" $idx "Field" $.ID "Rec" $receiver }} {{ template "dialect/sql/decode/field" . }} {{- end }} @@ -71,7 +71,7 @@ func ({{ $receiver }} *{{ $.Name }}) assignValues(columns []string, values []int {{- range $i, $fk := $.UnexportedForeignKeys }} {{- $f := $fk.Field }} case {{ if $fk.UserDefined }}{{ $.Package }}.{{ $.ID.Constant }}{{ else }}{{ $.Package }}.ForeignKeys[{{ $i }}]{{ end }}: - {{- if or $fk.UserDefined (and $f.UserDefined (or $f.IsString $f.IsUUID)) }} + {{- if or $fk.UserDefined (and $f.UserDefined (or $f.IsString $f.IsUUID $.ID.IsBytes)) }} {{- with extend $ "Idx" $idx "Field" $f "Rec" $receiver "StructField" $fk.StructField }} {{ template "dialect/sql/decode/field" . }} {{- end }} diff --git a/schema/field/field.go b/schema/field/field.go index 9f2ae2d75..3e4b5f08f 100644 --- a/schema/field/field.go +++ b/schema/field/field.go @@ -549,6 +549,13 @@ func (b *bytesBuilder) Optional() *bytesBuilder { return b } +// Unique makes the field unique within all vertices of this type. +// Only supported in PostgresSQL. +func (b *bytesBuilder) Unique() *bytesBuilder { + b.desc.Unique = true + return b +} + // Immutable indicates that this field cannot be updated. func (b *bytesBuilder) Immutable() *bytesBuilder { b.desc.Immutable = true diff --git a/schema/field/field_test.go b/schema/field/field_test.go index 85c54cffe..0d3ed8bad 100644 --- a/schema/field/field_test.go +++ b/schema/field/field_test.go @@ -188,6 +188,7 @@ func (Pair) Value() (driver.Value, error) { return nil, nil } func TestBytes(t *testing.T) { fd := field.Bytes("active"). + Unique(). Default([]byte("{}")). Comment("comment"). Validate(func(bytes []byte) error { @@ -195,6 +196,7 @@ func TestBytes(t *testing.T) { }). Descriptor() assert.Equal(t, "active", fd.Name) + assert.True(t, fd.Unique) assert.Equal(t, field.TypeBytes, fd.Info.Type) assert.NotNil(t, fd.Default) assert.Equal(t, []byte("{}"), fd.Default)