MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / GetAccount

Function GetAccount

cmd/cql-proxy/model/keystore.go:170–178  ·  view source on GitHub ↗

GetAccount returns the account object of specified keypair.

(db *gorp.DbMap, developer int64, account utils.AccountAddress)

Source from the content-addressed store, hash-verified

168
169// GetAccount returns the account object of specified keypair.
170func GetAccount(db *gorp.DbMap, developer int64, account utils.AccountAddress) (p *DeveloperPrivateKey, err error) {
171 err = db.SelectOne(&p,
172 `SELECT * FROM "private_keys" WHERE "account" = ? AND "developer_id" = ? LIMIT 1`,
173 account, developer)
174 if err != nil {
175 err = errors.Wrapf(err, "get account info failed")
176 }
177 return
178}
179
180// GetAllAccounts returns all accounts of developer.
181func GetAllAccounts(db *gorp.DbMap, developer int64) (keys []*DeveloperPrivateKey, err error) {

Callers 4

deleteKeyPairFunction · 0.92
SetMainAccountFunction · 0.85
GetPrivateKeyFunction · 0.85
SavePrivateKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected