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.writeQuery(ctx, cn, wr, query)
|
||||||
db.writeBlock(ctx, wr, nil)
|
db.writeBlock(ctx, wr, nil)
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
db.releaseConn(cn, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,11 +12,6 @@ import (
|
|||||||
"github.com/uptrace/go-clickhouse/ch/internal"
|
"github.com/uptrace/go-clickhouse/ch/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
type union struct {
|
|
||||||
expr string
|
|
||||||
query *SelectQuery
|
|
||||||
}
|
|
||||||
|
|
||||||
type SelectQuery struct {
|
type SelectQuery struct {
|
||||||
baseQuery
|
baseQuery
|
||||||
|
|
||||||
@ -31,10 +26,14 @@ type SelectQuery struct {
|
|||||||
limit int
|
limit int
|
||||||
offset int
|
offset int
|
||||||
final bool
|
final bool
|
||||||
|
|
||||||
union []union
|
union []union
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type union struct {
|
||||||
|
expr string
|
||||||
|
query *SelectQuery
|
||||||
|
}
|
||||||
|
|
||||||
var _ Query = (*SelectQuery)(nil)
|
var _ Query = (*SelectQuery)(nil)
|
||||||
|
|
||||||
func NewSelectQuery(db *DB) *SelectQuery {
|
func NewSelectQuery(db *DB) *SelectQuery {
|
||||||
@ -162,7 +161,7 @@ func (q *SelectQuery) ExcludeColumn(columns ...string) *SelectQuery {
|
|||||||
return q
|
return q
|
||||||
}
|
}
|
||||||
|
|
||||||
///------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
func (q *SelectQuery) Union(other *SelectQuery) *SelectQuery {
|
func (q *SelectQuery) Union(other *SelectQuery) *SelectQuery {
|
||||||
return q.addUnion(" UNION ", other)
|
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