mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-26 23:42:29 -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
|
Symbol string
|
||||||
// Number of decimal digits (to the right of the decimal point) this
|
// Number of decimal digits (to the right of the decimal point) this
|
||||||
// security is precise to
|
// security is precise to
|
||||||
Precision int
|
Precision int `db:"Preciseness"`
|
||||||
Type SecurityType
|
Type SecurityType
|
||||||
// AlternateId is CUSIP for Type=Stock, ISO4217 for Type=Currency
|
// AlternateId is CUSIP for Type=Stock, ISO4217 for Type=Currency
|
||||||
AlternateId string
|
AlternateId string
|
||||||
@ -206,7 +206,7 @@ func ImportGetCreateSecurity(tx *Tx, userid int64, security *Security) (*Securit
|
|||||||
|
|
||||||
var securities []*Security
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user