func MemoryTableFromMeta(alloc autoid.Allocator, tblInfo *model.TableInfo) (table.Table, error) {
	columns := make([]*table.Column, 0, len(tblInfo.Columns))
	var pkHandleColumn *table.Column
	for _, colInfo := range tblInfo.Columns {
		col := table.ToColumn(colInfo)
		columns = append(columns, col)
		if col.IsPKHandleColumn(tblInfo) {
			pkHandleColumn = col
		}
	}
	t := newMemoryTable(tblInfo.ID, tblInfo.Name.O, columns, alloc)
	t.pkHandleCol = pkHandleColumn
	t.meta = tblInfo
	return t, nil
}
// MemoryTableFromMeta creates a Table instance from model.TableInfo.
MemoryTableFromMeta creates a Table instance from model.TableInfo.
// MemoryTableFromMeta creates a Table instance from model . TableInfo .
func MemoryTableFromMeta(alloc autoid.Allocator, tblInfo *model.TableInfo) (table.Table, error) {
	columns := make([]*table.Column, 0, len(tblInfo.Columns))
	var pkHandleColumn *table.Column
	for _, colInfo := range tblInfo.Columns {
		col := table.ToColumn(colInfo)
		columns = append(columns, col)
		if col.IsPKHandleColumn(tblInfo) {
			pkHandleColumn = col
		}
	}
	t := newMemoryTable(tblInfo.ID, tblInfo.Name.O, columns, alloc)
	t.pkHandleCol = pkHandleColumn
	t.meta = tblInfo
	return t, nil
}
func MemoryTableFromMeta ( alloc autoid . Allocator , tblInfo * model . TableInfo ) ( table . Table , error ) { columns := make ( [ ] * table . Column , 0 , len ( tblInfo . Columns ) ) var pkHandleColumn * table . Column for _ , colInfo := range tblInfo . Columns { col := table . ToColumn ( colInfo ) columns = append ( columns , col ) if col . IsPKHandleColumn ( tblInfo ) { pkHandleColumn = col } } t := newMemoryTable ( tblInfo . ID , tblInfo . Name . O , columns , alloc ) t . pkHandleCol = pkHandleColumn t . meta = tblInfo return t , nil }
MemoryTableFromMeta creates a Table instance from model.TableInfo.
MemoryTableFromMeta creates a Table instance from model . TableInfo .