Skip to content

Commit

Permalink
add type aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
kshvakov committed Nov 16, 2018
1 parent 494f760 commit 60faf06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ import (
"github.com/kshvakov/clickhouse/lib/types"
)

type (
Date = types.Date
DateTime = types.DateTime
UUID = types.UUID
)

var (
ErrInsertInNotBatchMode = errors.New("insert statement supported only in the batch mode (use begin/commit)")
ErrLimitDataRequestInTx = errors.New("data request has already been prepared in transaction")
Expand Down
1 change: 1 addition & 0 deletions clickhouse_exception.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func (e *Exception) Error() string {
}

func (ch *clickhouse) exception() error {
defer ch.conn.Close()

This comment has been minimized.

Copy link
@c3mb0

c3mb0 Nov 21, 2018

Contributor

This line seems to be extremely crucial for the proper functioning of the connection after an error is received from the server. Does it get called when the library is used in conjunction with sqlx?

This comment has been minimized.

Copy link
@kshvakov

kshvakov Nov 21, 2018

Author Collaborator

Yes, if you use sqlx connection will be closed after error.

var (
e Exception
err error
Expand Down

0 comments on commit 60faf06

Please sign in to comment.