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

     1  package trace
     2  
     3  // tool gtrace used from ./internal/cmd/gtrace
     4  
     5  //go:generate gtrace
     6  
     7  import (
     8  	"context"
     9  )
    10  
    11  type (
    12  	// Scripting specified trace of scripting client activity.
    13  	// gtrace:gen
    14  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    15  	Scripting struct {
    16  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    17  		OnExecute func(ScriptingExecuteStartInfo) func(ScriptingExecuteDoneInfo)
    18  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    19  		OnStreamExecute func(
    20  			ScriptingStreamExecuteStartInfo,
    21  		) func(
    22  			ScriptingStreamExecuteIntermediateInfo,
    23  		) func(
    24  			ScriptingStreamExecuteDoneInfo,
    25  		)
    26  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    27  		OnExplain func(ScriptingExplainStartInfo) func(ScriptingExplainDoneInfo)
    28  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    29  		OnClose func(ScriptingCloseStartInfo) func(ScriptingCloseDoneInfo)
    30  	}
    31  	scriptingQueryParameters interface {
    32  		String() string
    33  	}
    34  	scriptingResultErr interface {
    35  		Err() error
    36  	}
    37  	scriptingResult interface {
    38  		scriptingResultErr
    39  		ResultSetCount() int
    40  	}
    41  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    42  	ScriptingExecuteStartInfo struct {
    43  		// Context make available context in trace callback function.
    44  		// Pointer to context provide replacement of context in trace callback function.
    45  		// Warning: concurrent access to pointer on client side must be excluded.
    46  		// Safe replacement of context are provided only inside callback function
    47  		Context    *context.Context
    48  		Call       call
    49  		Query      string
    50  		Parameters scriptingQueryParameters
    51  	}
    52  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    53  	ScriptingExecuteDoneInfo struct {
    54  		Result scriptingResult
    55  		Error  error
    56  	}
    57  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    58  	ScriptingStreamExecuteStartInfo struct {
    59  		// Context make available context in trace callback function.
    60  		// Pointer to context provide replacement of context in trace callback function.
    61  		// Warning: concurrent access to pointer on client side must be excluded.
    62  		// Safe replacement of context are provided only inside callback function
    63  		Context    *context.Context
    64  		Call       call
    65  		Query      string
    66  		Parameters scriptingQueryParameters
    67  	}
    68  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    69  	ScriptingStreamExecuteIntermediateInfo struct {
    70  		Error error
    71  	}
    72  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    73  	ScriptingStreamExecuteDoneInfo struct {
    74  		Error error
    75  	}
    76  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    77  	ScriptingExplainStartInfo struct {
    78  		// Context make available context in trace callback function.
    79  		// Pointer to context provide replacement of context in trace callback function.
    80  		// Warning: concurrent access to pointer on client side must be excluded.
    81  		// Safe replacement of context are provided only inside callback function
    82  		Context *context.Context
    83  		Call    call
    84  		Query   string
    85  	}
    86  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    87  	ScriptingExplainDoneInfo struct {
    88  		Plan  string
    89  		Error error
    90  	}
    91  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    92  	ScriptingCloseStartInfo struct {
    93  		// Context make available context in trace callback function.
    94  		// Pointer to context provide replacement of context in trace callback function.
    95  		// Warning: concurrent access to pointer on client side must be excluded.
    96  		// Safe replacement of context are provided only inside callback function
    97  		Context *context.Context
    98  		Call    call
    99  	}
   100  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   101  	ScriptingCloseDoneInfo struct {
   102  		Error error
   103  	}
   104  )