initial hasql support #407

Merged
vtolstov merged 8 commits from hasql into v4 2025-09-20 22:57:40 +03:00
Showing only changes of commit 6c6916a050 - Show all commits

View File

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