magma / domain-proxy

A Domain proxy for Magma
BSD 3-Clause "New" or "Revised" License
1 stars 6 forks source link

Minimize number of db queries in enodebd update cbsd #576

Open jkmar opened 1 year ago

jkmar commented 1 year ago

Currently we have following queries SELECT FROM CBSDS FOR UPDATE; UPDATE CBSDS; SELECT FROM CBSDS; SELECT FROM GRANTS; we want the following: SELECT FROM CBSDS JOIN GRANTS; // without for update UPDATE CBSDS;

Implement the following interface:

type EnodebdManager interface {
    FetchCbsd(runner sq.BaseRunner, serial string) (*DetailedCbsd, error)
    UpdateCbsd(runner sq.BaseRunner, cbsd *DBCbsd) error
}