Created
October 29, 2019 20:19
-
-
Save spencer-kormos-gbf/50cd82a9567babe4fd6ffbf74800aad2 to your computer and use it in GitHub Desktop.
Zeus Sql Output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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