vitess.io/vitess@v0.16.2/go/vt/vtexplain/testdata/test-vschema.json (about)

     1  {
     2  	"ks_unsharded": {
     3  		"sharded": false,
     4  		"tables": {
     5  			"t1": {},
     6  			"t2": {},
     7  			"table_not_in_schema": {}
     8  		}
     9  	},
    10  	"ks_sharded": {
    11  		"sharded": true,
    12  		"vindexes": {
    13  			"orders_id_vdx": {
    14  				"type": "lookup_unique",
    15  				"params": {
    16  					"table": "orders_id_lookup",
    17  					"from": "id",
    18  					"to": "keyspace_id"
    19  				},
    20  				"owner": "orders"
    21  			},
    22  			"orders_id_vdx_exclusive_read_lock": {
    23  				"type": "lookup_unique",
    24  				"params": {
    25  					"table": "orders_id_lookup_exclusive_read_lock",
    26  					"from": "id",
    27  					"to": "keyspace_id",
    28  					"read_lock": "exclusive"
    29  				},
    30  				"owner": "orders"
    31  			},
    32  			"orders_id_vdx_shared_read_lock": {
    33  				"type": "lookup_unique",
    34  				"params": {
    35  					"table": "orders_id_lookup_shared_read_lock",
    36  					"from": "id",
    37  					"to": "keyspace_id",
    38  					"read_lock": "shared"
    39  				},
    40  				"owner": "orders"
    41  			},
    42  			"orders_id_vdx_no_read_lock": {
    43  				"type": "lookup_unique",
    44  				"params": {
    45  					"table": "orders_id_lookup_no_read_lock",
    46  					"from": "id",
    47  					"to": "keyspace_id",
    48  					"read_lock": "none"
    49  				},
    50  				"owner": "orders"
    51  			},
    52  			"orders_id_vdx_no_verify": {
    53  				"type": "lookup_unique",
    54  				"params": {
    55  					"table": "orders_id_lookup_no_verify",
    56  					"from": "id",
    57  					"to": "keyspace_id",
    58                                          "no_verify": "true"
    59  				},
    60  				"owner": "orders"
    61  			},
    62  			"music_user_map": {
    63  				"type": "lookup_hash_unique",
    64  				"owner": "music",
    65  				"params": {
    66  					"table": "music_user_map",
    67  					"from": "music_id",
    68  					"to": "user_id"
    69  				}
    70  			},
    71  			"name_user_map": {
    72  				"type": "lookup_hash_unique",
    73  				"owner": "user",
    74  				"params": {
    75  					"table": "name_user_map",
    76  					"from": "name",
    77  					"to": "user_id"
    78  				}
    79  			},
    80  			"email_customer_map": {
    81  				"type": "lookup_hash_unique",
    82  				"owner": "customer",
    83  				"params": {
    84  					"table": "email_customer_map",
    85  					"from": "email",
    86  					"to": "user_id",
    87  					"batch_lookup": "true"
    88  				}
    89  			},
    90  			"hash": {
    91  				"type": "hash"
    92  			},
    93  			"md5": {
    94  				"type": "unicode_loose_md5"
    95  			},
    96  			"multicol_vdx": {
    97  				"type": "multicol",
    98  				"params": {
    99  					"column_count": "2",
   100  					"column_bytes": "1,7",
   101  					"column_vindex": "numeric,xxhash"
   102  				}
   103  			},
   104  			"lkp_msac_vdx": {
   105  				"type": "lookup_hash_unique",
   106  				"params": {
   107  					"table": "lkp_idx",
   108  					"from": "lkp",
   109  					"to": "id",
   110  					"multi_shard_autocommit": "true",
   111  					"batch_lookup": "true"
   112  				},
   113  				"owner": "member"
   114  			}
   115  		},
   116  		"tables": {
   117  			"user": {
   118  				"column_vindexes": [
   119  					{
   120  						"column": "id",
   121  						"name": "hash"
   122  					},
   123  					{
   124  						"column": "name",
   125  						"name": "name_user_map"
   126  					}
   127  				]
   128  			},
   129  			"music": {
   130  				"column_vindexes": [
   131  					{
   132  						"column": "user_id",
   133  						"name": "hash"
   134  					},
   135  					{
   136  						"column": "id",
   137  						"name": "music_user_map"
   138  					}
   139  				]
   140  			},
   141  			"music_extra": {
   142  				"column_vindexes": [
   143  					{
   144  						"column": "id",
   145  						"name": "hash"
   146  					}
   147  				]
   148  			},
   149  			"name_user_map": {
   150  				"column_vindexes": [
   151  					{
   152  						"column": "name",
   153  						"name": "md5"
   154  					}
   155  				]
   156  			},
   157  			"name_info": {
   158  				"column_vindexes": [
   159  					{
   160  						"column": "name",
   161  						"name": "md5"
   162  					}
   163  				],
   164  				"columns": [
   165  						{
   166  							"name": "name",
   167  							"type": "VARCHAR"
   168  						},
   169  						{
   170  							"name": "info",
   171  							"type": "VARCHAR"
   172  						}
   173  				],
   174  					"column_list_authoritative": true
   175  			},
   176  			"customer": {
   177  				"column_vindexes": [
   178  					{
   179  						"column": "id",
   180  						"name": "hash"
   181  					},
   182  					{
   183  						"column": "email",
   184  						"name": "email_customer_map"
   185  					}
   186  				]
   187  			},
   188  			"orders": {
   189  				"column_vindexes": [
   190  					{
   191  						"column": "customer_id",
   192  						"name": "hash"
   193  					},
   194  					{
   195  						"column": "id",
   196  						"name": "orders_id_vdx"
   197  					}
   198  				]
   199  			},
   200  			"orders_id_lookup": {
   201  				"column_vindexes": [
   202  					{
   203  						"column": "id",
   204  						"name": "hash"
   205  					}
   206  				]
   207  			},
   208  			"orders_id_lookup_no_read_lock": {
   209  				"column_vindexes": [
   210  					{
   211  						"column": "id",
   212  						"name": "hash"
   213  					}
   214  				]
   215  			},
   216  			"orders_id_lookup_no_verify": {
   217  				"column_vindexes": [
   218  					{
   219  						"column": "id",
   220  						"name": "hash"
   221  					}
   222  				]
   223  			},
   224  			"email_customer_map": {
   225  				"column_vindexes": [
   226  					{
   227  						"column": "email",
   228  						"name": "md5"
   229  					}
   230  				]
   231  			},
   232  			"user_region": {
   233  				"column_vindexes": [
   234  					{
   235  						"columns": ["regionId","userId"],
   236  						"name": "multicol_vdx"
   237  					}
   238  				]
   239  			},
   240  			"member": {
   241  				"column_vindexes": [
   242  					{
   243  						"column": "id",
   244  						"name": "hash"
   245  					},
   246  					{
   247  						"column": "lkp",
   248  						"name": "lkp_msac_vdx"
   249  					}
   250  				]
   251  			},
   252  			"lkp_idx": {
   253  				"column_vindexes": [
   254  					{
   255  						"column": "lkp",
   256  						"name": "md5"
   257  					}
   258  				]
   259  			}
   260  		}
   261  	}
   262  }