Skip to content

Instantly share code, notes, and snippets.

@spencer-kormos-gbf
Created October 29, 2019 20:19
Show Gist options
  • Select an option

  • Save spencer-kormos-gbf/50cd82a9567babe4fd6ffbf74800aad2 to your computer and use it in GitHub Desktop.

Select an option

Save spencer-kormos-gbf/50cd82a9567babe4fd6ffbf74800aad2 to your computer and use it in GitHub Desktop.
Zeus Sql Output
import "github.com/getbread/breadkit/zeus/searcher"
func TestZeus(t *testing.T) {
lsr := loanSearch.LoanSearchRequest{}
yy, mm, dd := time.Now().Date()
midnight := time.Date(yy, mm, dd, 0, 0, 0, 0, time.Now().Location())
lsr.AddFilter(loanSearch.LoanSearch_PaidOffAt, midnight.AddDate(0, 0, -fullPaymentDelayDays), searcher.Operator_GTE, searcher.Condition_AND)
lsr.AddFilter(loanSearch.LoanSearch_PaidOffAt, midnight.AddDate(0, 0, 1-fullPaymentDelayDays), searcher.Operator_LT, searcher.Condition_AND)
fmt.Println()
if str, val, err := searcher.GetSelectSql(&lsr); err == nil {
fmt.Println(str)
fmt.Printf("%+v", val)
} else {
fmt.Println(err)
t.Fail()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment