initial hasql support
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -26,17 +26,6 @@ func newSQLRowError() *sql.Row {
|
|||||||
return row
|
return row
|
||||||
}
|
}
|
||||||
|
|
||||||
func newSQLRowsError() *sql.Rows {
|
|
||||||
rows := &sql.Rows{}
|
|
||||||
t := reflect.TypeOf(rows).Elem()
|
|
||||||
field, _ := t.FieldByName("lasterr")
|
|
||||||
rowPtr := unsafe.Pointer(rows)
|
|
||||||
errFieldPtr := unsafe.Pointer(uintptr(rowPtr) + field.Offset)
|
|
||||||
errPtr := (*error)(errFieldPtr)
|
|
||||||
*errPtr = errNoAliveNodes
|
|
||||||
return rows
|
|
||||||
}
|
|
||||||
|
|
||||||
type ClusterQuerier interface {
|
type ClusterQuerier interface {
|
||||||
Querier
|
Querier
|
||||||
WaitForNodes(ctx context.Context, criterion ...hasql.NodeStateCriterion) error
|
WaitForNodes(ctx context.Context, criterion ...hasql.NodeStateCriterion) error
|
||||||
|
Reference in New Issue
Block a user