github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/scripting/scripting.go (about)

     1  package scripting
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/ydb-platform/ydb-go-sdk/v3/internal/params"
     7  	"github.com/ydb-platform/ydb-go-sdk/v3/table"
     8  	"github.com/ydb-platform/ydb-go-sdk/v3/table/result"
     9  )
    10  
    11  type ExplainMode = uint8
    12  
    13  const (
    14  	ExplainModeUnknown ExplainMode = iota
    15  	ExplainModeValidate
    16  	ExplainModePlan
    17  
    18  	ExplainModeDefault = ExplainModePlan
    19  )
    20  
    21  type Client interface {
    22  	Execute(
    23  		ctx context.Context,
    24  		query string,
    25  		params *params.Parameters,
    26  	) (result.Result, error)
    27  	Explain(
    28  		ctx context.Context,
    29  		query string,
    30  		mode ExplainMode,
    31  	) (table.ScriptingYQLExplanation, error)
    32  	StreamExecute(
    33  		ctx context.Context,
    34  		query string,
    35  		params *params.Parameters,
    36  	) (result.StreamResult, error)
    37  }