You've already forked go-clickhouse
mirror of
https://github.com/uptrace/go-clickhouse.git
synced 2025-07-03 00:27:03 +02:00
chore: remove missing releaseConn
This commit is contained in:
1
ch/db.go
1
ch/db.go
@ -325,6 +325,7 @@ func (db *DB) _query(ctx context.Context, query string) (*blockIter, error) {
|
||||
db.writeQuery(ctx, cn, wr, query)
|
||||
db.writeBlock(ctx, wr, nil)
|
||||
}); err != nil {
|
||||
db.releaseConn(cn, err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
@ -12,11 +12,6 @@ import (
|
||||
"github.com/uptrace/go-clickhouse/ch/internal"
|
||||
)
|
||||
|
||||
type union struct {
|
||||
expr string
|
||||
query *SelectQuery
|
||||
}
|
||||
|
||||
type SelectQuery struct {
|
||||
baseQuery
|
||||
|
||||
@ -31,8 +26,12 @@ type SelectQuery struct {
|
||||
limit int
|
||||
offset int
|
||||
final bool
|
||||
union []union
|
||||
}
|
||||
|
||||
union []union
|
||||
type union struct {
|
||||
expr string
|
||||
query *SelectQuery
|
||||
}
|
||||
|
||||
var _ Query = (*SelectQuery)(nil)
|
||||
@ -162,7 +161,7 @@ func (q *SelectQuery) ExcludeColumn(columns ...string) *SelectQuery {
|
||||
return q
|
||||
}
|
||||
|
||||
///------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
func (q *SelectQuery) Union(other *SelectQuery) *SelectQuery {
|
||||
return q.addUnion(" UNION ", other)
|
||||
|
2
ch/testdata/snapshots/TestQuery-19
vendored
2
ch/testdata/snapshots/TestQuery-19
vendored
@ -1 +1 @@
|
||||
CREATE TABLE IF NOT EXISTS "my-table_dist" AS "my-table" ON CLUSTER "my-cluster" Engine = Distributed("my-cluster", currentDatabase(), "my-table", rand())
|
||||
CREATE TABLE IF NOT EXISTS "my-table_dist" ON CLUSTER "my-cluster" AS "my-table" Engine = Distributed("my-cluster", currentDatabase(), "my-table", rand())
|
||||
|
Reference in New Issue
Block a user