Alexey Kim 3 сар өмнө
parent
commit
9faf70359e
2 өөрчлөгдсөн 5 нэмэгдсэн , 0 устгасан
  1. 4 0
      clickhouse/clickhouse.go
  2. 1 0
      db.go

+ 4 - 0
clickhouse/clickhouse.go

@@ -81,6 +81,10 @@ func (ch *_ch) Ping(ctx context.Context) error {
 	return ch.cli.Ping(ctx)
 }
 
+func (ch *_ch) Exec(ctx context.Context, query string, args ...any) error {
+	return ch.cli.Exec(ctx, query, args...)
+}
+
 func (ch *_ch) Query(ctx context.Context, query string, args ...any) (driver.Rows, error) {
 	return ch.cli.Query(ctx, query, args...)
 }

+ 1 - 0
db.go

@@ -9,6 +9,7 @@ type Clickhouse interface {
 	Service
 
 	Ping(context.Context) error
+	Exec(context.Context, string, ...any) error
 	Query(context.Context, string, ...any) (driver.Rows, error)
 	Batch(context.Context, string, bool) (driver.Batch, error)
 }