3.2.directly table operation

  • CreateTables() engine.CreateTables(struct) creates table with struct or struct pointer. engine.Charset() and engine.StoreEngine() can change charset or storage engine for mysql database.

  • IsTableEmpty() check table is empty or not.

  • IsTableExist() check table is existed or not.

  • DropTables() engine.DropTables(struct) drops table and indexes with struct or struct pointer. engine.DropTables(string) only drops table except indexes.