-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for DATETIME columns in DBRunner #129
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
I understand your concern.
The handling of return values will need to be improved in the future.
I tried running it locally and got an error.
|
This comment has been minimized.
This comment has been minimized.
Code Metrics Report
Details | | main (32037d6) | #129 (1454eb7) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 73.5% | 73.4% | -0.1% |
| Files | 18 | 18 | 0 |
| Lines | 2000 | 2004 | +4 |
| Covered | 1470 | 1470 | 0 |
- | Code to Test Ratio | 1:0.7 | 1:0.7 | -0.0 |
| Code | 3871 | 3879 | +8 |
| Test | 2792 | 2792 | 0 |
- | Test Execution Time | 40s | 45s | +5s | Code coverage of files in pull request scope (63.0% → 60.6%)
Reported by octocov |
@@ -95,7 +95,7 @@ func (rnr *dbRunner) Run(ctx context.Context, q *dbQuery) error { | |||
case "TEXT", "VARCHAR", "NVARCHAR": | |||
row[c] = s | |||
case "DATETIME": | |||
dt, err := time.Parse(s, "2006-01-02 15:04:05") | |||
dt, err := time.Parse("2006-01-02 15:04:05", s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The specified argument was incorrect. 🤮
fix #124
Reason for concern
Can you identify the format from the DB connection driver?
No generic DateTime formatting library exists?
The following types exist, but they are all treated as numbers
DECIMAL, BOOL, INT, BIGINT