Skip to content

Commit 7fa2a32

Browse files
committed
Intentionally defining contractual interfaces to be exported. ⤵️
I'm allowing these contractual interfaces to be exported so they can be conveniently referenced by calling code. This decision was made after careful consideration of intended implementation patterns as I actually coded against the new API, which helped determine that the ability to reference these type definitions provides significant value.
1 parent da27bd4 commit 7fa2a32

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

contracts.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ type (
1515

1616
// Pool is a common subset of methods implemented by *sql.DB and *sql.Tx.
1717
// The name is a nod to that fact that a *sql.DB implements a Pool of connections.
18-
// TODO: perhaps un-export?
1918
Pool interface {
2019
PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
2120
ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
@@ -32,7 +31,6 @@ type (
3231
}
3332

3433
// Script represents SQL statements that aren't expected to provide rows as a result.
35-
// TODO: perhaps un-export?
3634
Script interface {
3735
// Statements returns a string containing 1 or more SQL statements, separated by `;`.
3836
// This means that the ';' character should NOT be used within any of the statements.
@@ -51,7 +49,6 @@ type (
5149

5250
// Query represents a SQL statement that is expected to provide rows as a result.
5351
// Rows are fed to the Scan method.
54-
// TODO: perhaps un-export?
5552
Query interface {
5653
// Statement returns a string containing a single SQL query.
5754
Statement() string

0 commit comments

Comments
 (0)