Skip to content
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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conn type #244

wants to merge 4 commits into from

Conversation

AlekSi
Copy link
Member

@AlekSi AlekSi commented Aug 31, 2020

Closes #157.

@AlekSi AlekSi added the feature label Aug 31, 2020
@AlekSi AlekSi added this to the v1.5.0 milestone Aug 31, 2020
conn.go Outdated Show resolved Hide resolved
conn.go Outdated Show resolved Hide resolved
conn.go Outdated Show resolved Hide resolved
@@ -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.
Copy link
Member

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 {
Copy link
Member

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 {
Copy link
Member

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) {
Copy link
Member

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)

reform-db/main.go Outdated Show resolved Hide resolved
reform-db/main.go Outdated Show resolved Hide resolved
reform-db/main.go Outdated Show resolved Hide resolved
@@ -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
Copy link
Member

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(
Copy link
Member

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
Copy link

codecov bot commented Aug 31, 2020

Codecov Report

Merging #244 into main will decrease coverage by 0.53%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
conn.go 0.00% <0.00%> (ø)
db.go 74.46% <0.00%> (-10.90%) ⬇️
querier.go 89.47% <ø> (ø)
tx.go 80.95% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e66d963...1d42da5. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide Conn type
2 participants