1
0
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:
Vladimir Mihailenco
2023-10-01 13:19:30 +03:00
parent a4c3d24dfd
commit 48aa57b286
3 changed files with 8 additions and 8 deletions

View File

@ -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
}

View File

@ -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)

View File

@ -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())