-
Notifications
You must be signed in to change notification settings - Fork 73
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
Conn type #244
base: main
Are you sure you want to change the base?
Conversation
@@ -117,7 +117,7 @@ func teardown(t testing.TB, db *reform.DB) { | |||
} | |||
|
|||
// Deprecated: do not add new test to this suite, use Go subtests instead. | |||
// TODO Remove. | |||
// TODO Remove: https://github.com/go-reform/reform/issues/141. |
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.
[Optional linters] reported by reviewdog 🐶
base_test.go:120: Line contains TODO/BUG/FIXME: "TODO Remove: https://github.com/go-refor..." (godox)
// check interface | ||
var _ connInterface = (*sql.Conn)(nil) | ||
|
||
type Conn struct { |
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.
[Optional linters] reported by reviewdog 🐶
exported type Conn
should have comment or be unexported (golint)
} | ||
} | ||
|
||
func (c *Conn) Close() error { |
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.
[Optional linters] reported by reviewdog 🐶
exported method Conn.Close
should have comment or be unexported (golint)
@@ -51,6 +47,15 @@ | |||
return db.db | |||
} | |||
|
|||
func (db *DB) Conn() (*Conn, error) { |
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.
[Optional linters] reported by reviewdog 🐶
exported method DB.Conn
should have comment or be unexported (golint)
@@ -57,6 +57,10 @@ func ConnectToTestDB() *reform.DB { | |||
|
|||
// Use single connection so various session-related variables work. | |||
// For example: "PRAGMA foreign_keys" for SQLite3, "SET IDENTITY_INSERT" for MS SQL, etc. | |||
// | |||
// FIXME |
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.
[Optional linters] reported by reviewdog 🐶
internal/test_db.go:61: Line contains TODO/BUG/FIXME: "FIXME" (godox)
// MySQL doesn't have table_catalog in table_constraints | ||
using = using[1:] | ||
} | ||
for i, u := range using { | ||
using[i] = fmt.Sprintf("key_column_usage.%s = table_constraints.%s", u, u) | ||
} | ||
q := fmt.Sprintf( | ||
query := fmt.Sprintf( |
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.
[go-consistent] reported by reviewdog 🐶
arg list parens: align )
to a same line with last argument
Codecov Report
@@ Coverage Diff @@
## main #244 +/- ##
==========================================
- Coverage 68.00% 67.47% -0.54%
==========================================
Files 19 20 +1
Lines 1641 1654 +13
==========================================
Hits 1116 1116
- Misses 473 486 +13
Partials 52 52
Continue to review full report at Codecov.
|
Closes #157.