mirror of https://github.com/VinGarcia/ksql.git
Add ChangeTable function
parent
a5ee2458ec
commit
80fad8ac3f
|
@ -32,6 +32,14 @@ func NewClient(dbDriver string, connectionString string, maxOpenConns int) (Clie
|
|||
}, nil
|
||||
}
|
||||
|
||||
// ChangeTable returns a new Client configured to use a new table
|
||||
func (c Client) ChangeTable(ctx context.Context, tableName string) (*Client, error) {
|
||||
return &Client{
|
||||
db: c.db,
|
||||
tableName: tableName,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Find one instance from the database, the input struct
|
||||
// must be passed by reference and the query should
|
||||
// return only one result.
|
||||
|
|
Loading…
Reference in New Issue