table := &table.Table{ Name: "users", Columns: []*table.Column{ { Name: "id", DataType: types.LongType }, { Name: "name", DataType: types.StringType }, { Name: "age", DataType: types.IntType }, }, }
record := &table.Record{ Values: []types.Datum{ types.NewIntDatum(1), types.NewStringDatum("John"), types.NewIntDatum(24), }, } key := table.NewRecordKey(record)This example creates a new record with values for the id, name, and age columns, and then creates a new `RecordKey` from that record. The `RecordKey` contains the primary key of the record.