mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-31 23:16:22 -07:00
Move database schema updating to gochan-migration
This commit is contained in:
parent
1da4330780
commit
17c28e5ebe
8 changed files with 260 additions and 119 deletions
|
@ -142,7 +142,7 @@ func QueryRowSQL(query string, values, out []interface{}) error {
|
|||
}
|
||||
|
||||
/*
|
||||
QueryRowSQL gets a row from the db with the values in values[] and fills the respective pointers in out[]
|
||||
QueryRowTxSQL gets a row from the db with the values in values[] and fills the respective pointers in out[]
|
||||
Automatically escapes the given values and caches the query
|
||||
Example:
|
||||
|
||||
|
@ -160,11 +160,7 @@ func QueryRowTxSQL(tx *sql.Tx, query string, values, out []interface{}) error {
|
|||
if gcdb == nil {
|
||||
return ErrNotConnected
|
||||
}
|
||||
stmt, err := PrepareSQL(query, tx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return stmt.QueryRow(values...).Scan(out...)
|
||||
return gcdb.QueryRowTxSQL(tx, query, values, out)
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue