mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-25 23:23:21 -05:00
securities: Don't use 'precision', a MySQL reserved word, in DB
This commit is contained in:
parent
be0d9051d4
commit
4d0b33efee
@ -38,7 +38,7 @@ type Security struct {
|
||||
Symbol string
|
||||
// Number of decimal digits (to the right of the decimal point) this
|
||||
// security is precise to
|
||||
Precision int
|
||||
Precision int `db:"Preciseness"`
|
||||
Type SecurityType
|
||||
// AlternateId is CUSIP for Type=Stock, ISO4217 for Type=Currency
|
||||
AlternateId string
|
||||
@ -206,7 +206,7 @@ func ImportGetCreateSecurity(tx *Tx, userid int64, security *Security) (*Securit
|
||||
|
||||
var securities []*Security
|
||||
|
||||
_, err := tx.Select(&securities, "SELECT * from securities where UserId=? AND Type=? AND AlternateId=? AND Precision=?", userid, security.Type, security.AlternateId, security.Precision)
|
||||
_, err := tx.Select(&securities, "SELECT * from securities where UserId=? AND Type=? AND AlternateId=? AND Preciseness=?", userid, security.Type, security.AlternateId, security.Precision)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user