@@ -29,39 +29,39 @@ public Sample()
2929 public async Task CreateTables ( )
3030 {
3131 using var admin = _factory . GetTransactionAdmin ( ) ;
32-
33- var customersTableMetadata
34- = new TableMetadataBuilder ( )
35- . AddPartitionKey ( "customer_id" , DataType . Int )
36- . AddColumn ( "name" , DataType . Text )
37- . AddColumn ( "credit_limit" , DataType . Int )
38- . AddColumn ( "credit_total" , DataType . Int )
39- . Build ( ) ;
40-
41- var ordersTableMetadata
42- = new TableMetadataBuilder ( )
43- . AddSecondaryIndex ( "order_id" , DataType . Text )
44- . AddPartitionKey ( "customer_id" , DataType . Int )
45- . AddClusteringKey ( "timestamp" , DataType . Bigint )
46- . Build ( ) ;
47-
48- var statementsTableMetadata
49- = new TableMetadataBuilder ( )
32+
33+ var customersTableMetadata =
34+ new TableMetadataBuilder ( )
35+ . AddPartitionKey ( "customer_id" , DataType . Int )
36+ . AddColumn ( "name" , DataType . Text )
37+ . AddColumn ( "credit_limit" , DataType . Int )
38+ . AddColumn ( "credit_total" , DataType . Int )
39+ . Build ( ) ;
40+
41+ var ordersTableMetadata =
42+ new TableMetadataBuilder ( )
43+ . AddSecondaryIndex ( "order_id" , DataType . Text )
44+ . AddPartitionKey ( "customer_id" , DataType . Int )
45+ . AddClusteringKey ( "timestamp" , DataType . Bigint )
46+ . Build ( ) ;
47+
48+ var statementsTableMetadata =
49+ new TableMetadataBuilder ( )
5050 . AddPartitionKey ( "order_id" , DataType . Text )
5151 . AddClusteringKey ( "item_id" , DataType . Int )
5252 . AddColumn ( "count" , DataType . Int )
5353 . Build ( ) ;
54-
55- var itemsTableMetadata
56- = new TableMetadataBuilder ( )
54+
55+ var itemsTableMetadata =
56+ new TableMetadataBuilder ( )
5757 . AddPartitionKey ( "item_id" , DataType . Int )
5858 . AddColumn ( "name" , DataType . Text )
5959 . AddColumn ( "price" , DataType . Int )
6060 . Build ( ) ;
61-
61+
6262 await admin . CreateCoordinatorTablesAsync ( true ) ;
6363 await admin . CreateNamespaceAsync ( "sample" , true ) ;
64-
64+
6565 await admin . CreateTableAsync ( "sample" , "customers" , customersTableMetadata , true ) ;
6666 await admin . CreateTableAsync ( "sample" , "orders" , ordersTableMetadata , true ) ;
6767 await admin . CreateTableAsync ( "sample" , "statements" , statementsTableMetadata , true ) ;
0 commit comments