func (db *DB) InitializeTables(schemaName string, schemaSpec string) (err error) {

	// Use the schema
	if _, err = db.DBHandler.Exec("USE " + schemaName + ";"); err != nil {
		err = fmt.Errorf("Could not use %s schema: \n%s", schemaName, err)
		return
	}
	for _, chain := range db.coinList {
		tableQuery := fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s (%s);", chain.Name, schemaSpec)
		if _, err = db.DBHandler.Exec(tableQuery); err != nil {
			err = fmt.Errorf("Could not create table %s: \n%s", chain.Name, err)
			return
		}
	}
	return
}
// InitializeTables initializes all of the tables necessary for the exchange to run, using the coin list that is set up.
InitializeTables initializes all of the tables necessary for the exchange to run, using the coin list that is set up.
// InitializeTables initializes all of the tables necessary for the exchange to run using the coin list that is set up .
func (db *DB) InitializeTables(schemaName string, schemaSpec string) (err error) {
	if _, err = db.DBHandler.Exec("USE " + schemaName + ";"); err != nil {
		err = fmt.Errorf("Could not use %s schema: \n%s", schemaName, err)
		return
	}
	for _, chain := range db.coinList {
		tableQuery := fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s (%s);", chain.Name, schemaSpec)
		if _, err = db.DBHandler.Exec(tableQuery); err != nil {
			err = fmt.Errorf("Could not create table %s: \n%s", chain.Name, err)
			return
		}
	}
	return
}
func ( db * DB ) InitializeTables ( schemaName string , schemaSpec string ) ( err error ) { if _ , err = db . DBHandler . Exec ( " " + schemaName + " " ) ; err != nil { err = fmt . Errorf ( " \n " , schemaName , err ) return } for _ , chain := range db . coinList { tableQuery := fmt . Sprintf ( " " , chain . Name , schemaSpec ) if _ , err = db . DBHandler . Exec ( tableQuery ) ; err != nil { err = fmt . Errorf ( " \n " , chain . Name , err ) return } } return }
InitializeTables initializes all of the tables necessary for the exchange to run, using the coin list that is set up.
InitializeTables initializes all of the tables necessary for the exchange to run using the coin list that is set up .
// Use the schema