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

     1  package trace
     2  
     3  //go:generate gtrace
     4  
     5  import (
     6  	"context"
     7  	"time"
     8  )
     9  
    10  type (
    11  	// DatabaseSQL specified trace of `database/sql` call activity.
    12  	// gtrace:gen
    13  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    14  	DatabaseSQL struct {
    15  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    16  		OnConnectorConnect func(DatabaseSQLConnectorConnectStartInfo) func(DatabaseSQLConnectorConnectDoneInfo)
    17  
    18  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    19  		OnConnPing func(DatabaseSQLConnPingStartInfo) func(DatabaseSQLConnPingDoneInfo)
    20  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    21  		OnConnPrepare func(DatabaseSQLConnPrepareStartInfo) func(DatabaseSQLConnPrepareDoneInfo)
    22  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    23  		OnConnClose func(DatabaseSQLConnCloseStartInfo) func(DatabaseSQLConnCloseDoneInfo)
    24  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    25  		OnConnBegin func(DatabaseSQLConnBeginStartInfo) func(DatabaseSQLConnBeginDoneInfo)
    26  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    27  		OnConnQuery func(DatabaseSQLConnQueryStartInfo) func(DatabaseSQLConnQueryDoneInfo)
    28  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    29  		OnConnExec func(DatabaseSQLConnExecStartInfo) func(DatabaseSQLConnExecDoneInfo)
    30  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    31  		OnConnIsTableExists func(DatabaseSQLConnIsTableExistsStartInfo) func(DatabaseSQLConnIsTableExistsDoneInfo)
    32  
    33  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    34  		OnTxQuery func(DatabaseSQLTxQueryStartInfo) func(DatabaseSQLTxQueryDoneInfo)
    35  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    36  		OnTxExec func(DatabaseSQLTxExecStartInfo) func(DatabaseSQLTxExecDoneInfo)
    37  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    38  		OnTxPrepare func(DatabaseSQLTxPrepareStartInfo) func(DatabaseSQLTxPrepareDoneInfo)
    39  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    40  		OnTxCommit func(DatabaseSQLTxCommitStartInfo) func(DatabaseSQLTxCommitDoneInfo)
    41  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    42  		OnTxRollback func(DatabaseSQLTxRollbackStartInfo) func(DatabaseSQLTxRollbackDoneInfo)
    43  
    44  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    45  		OnStmtQuery func(DatabaseSQLStmtQueryStartInfo) func(DatabaseSQLStmtQueryDoneInfo)
    46  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    47  		OnStmtExec func(DatabaseSQLStmtExecStartInfo) func(DatabaseSQLStmtExecDoneInfo)
    48  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    49  		OnStmtClose func(DatabaseSQLStmtCloseStartInfo) func(DatabaseSQLStmtCloseDoneInfo)
    50  
    51  		// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    52  		OnDoTx func(DatabaseSQLDoTxStartInfo) func(DatabaseSQLDoTxIntermediateInfo) func(DatabaseSQLDoTxDoneInfo)
    53  	}
    54  
    55  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    56  	DatabaseSQLConnectorConnectStartInfo struct {
    57  		// Context make available context in trace callback function.
    58  		// Pointer to context provide replacement of context in trace callback function.
    59  		// Warning: concurrent access to pointer on client side must be excluded.
    60  		// Safe replacement of context are provided only inside callback function
    61  		Context *context.Context
    62  		Call    call
    63  	}
    64  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    65  	DatabaseSQLConnectorConnectDoneInfo struct {
    66  		Error   error
    67  		Session sessionInfo
    68  	}
    69  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    70  	DatabaseSQLConnPingStartInfo struct {
    71  		// Context make available context in trace callback function.
    72  		// Pointer to context provide replacement of context in trace callback function.
    73  		// Warning: concurrent access to pointer on client side must be excluded.
    74  		// Safe replacement of context are provided only inside callback function
    75  		Context *context.Context
    76  		Call    call
    77  	}
    78  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    79  	DatabaseSQLConnPingDoneInfo struct {
    80  		Error error
    81  	}
    82  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    83  	DatabaseSQLConnPrepareStartInfo struct {
    84  		// Context make available context in trace callback function.
    85  		// Pointer to context provide replacement of context in trace callback function.
    86  		// Warning: concurrent access to pointer on client side must be excluded.
    87  		// Safe replacement of context are provided only inside callback function
    88  		Context *context.Context
    89  		Call    call
    90  		Query   string
    91  	}
    92  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    93  	DatabaseSQLConnPrepareDoneInfo struct {
    94  		Error error
    95  	}
    96  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
    97  	DatabaseSQLTxPrepareStartInfo struct {
    98  		// Context make available context in trace callback function.
    99  		// Pointer to context provide replacement of context in trace callback function.
   100  		// Warning: concurrent access to pointer on client side must be excluded.
   101  		// Safe replacement of context are provided only inside callback function
   102  		Context   *context.Context
   103  		Call      call
   104  		TxContext context.Context //nolint:containedctx
   105  		Tx        txInfo
   106  		Query     string
   107  	}
   108  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   109  	DatabaseSQLTxPrepareDoneInfo struct {
   110  		Error error
   111  	}
   112  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   113  	DatabaseSQLConnCloseStartInfo struct {
   114  		// Context make available context in trace callback function.
   115  		// Pointer to context provide replacement of context in trace callback function.
   116  		// Warning: concurrent access to pointer on client side must be excluded.
   117  		// Safe replacement of context are provided only inside callback function
   118  		Context *context.Context
   119  		Call    call
   120  	}
   121  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   122  	DatabaseSQLConnCloseDoneInfo struct {
   123  		Error error
   124  	}
   125  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   126  	DatabaseSQLConnBeginStartInfo struct {
   127  		// Context make available context in trace callback function.
   128  		// Pointer to context provide replacement of context in trace callback function.
   129  		// Warning: concurrent access to pointer on client side must be excluded.
   130  		// Safe replacement of context are provided only inside callback function
   131  		Context *context.Context
   132  		Call    call
   133  	}
   134  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   135  	DatabaseSQLConnBeginDoneInfo struct {
   136  		Tx    txInfo
   137  		Error error
   138  	}
   139  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   140  	DatabaseSQLConnQueryStartInfo struct {
   141  		// Context make available context in trace callback function.
   142  		// Pointer to context provide replacement of context in trace callback function.
   143  		// Warning: concurrent access to pointer on client side must be excluded.
   144  		// Safe replacement of context are provided only inside callback function
   145  		Context    *context.Context
   146  		Call       call
   147  		Query      string
   148  		Mode       string
   149  		Idempotent bool
   150  		IdleTime   time.Duration
   151  	}
   152  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   153  	DatabaseSQLConnQueryDoneInfo struct {
   154  		Error error
   155  	}
   156  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   157  	DatabaseSQLConnExecStartInfo struct {
   158  		// Context make available context in trace callback function.
   159  		// Pointer to context provide replacement of context in trace callback function.
   160  		// Warning: concurrent access to pointer on client side must be excluded.
   161  		// Safe replacement of context are provided only inside callback function
   162  		Context    *context.Context
   163  		Call       call
   164  		Query      string
   165  		Mode       string
   166  		Idempotent bool
   167  		IdleTime   time.Duration
   168  	}
   169  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   170  	DatabaseSQLConnExecDoneInfo struct {
   171  		Error error
   172  	}
   173  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   174  	DatabaseSQLConnIsTableExistsStartInfo struct {
   175  		// Context make available context in trace callback function.
   176  		// Pointer to context provide replacement of context in trace callback function.
   177  		// Warning: concurrent access to pointer on client side must be excluded.
   178  		// Safe replacement of context are provided only inside callback function
   179  		Context   *context.Context
   180  		Call      call
   181  		TableName string
   182  	}
   183  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   184  	DatabaseSQLConnIsTableExistsDoneInfo struct {
   185  		Exists bool
   186  		Error  error
   187  	}
   188  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   189  	DatabaseSQLTxQueryStartInfo struct {
   190  		// Context make available context in trace callback function.
   191  		// Pointer to context provide replacement of context in trace callback function.
   192  		// Warning: concurrent access to pointer on client side must be excluded.
   193  		// Safe replacement of context are provided only inside callback function
   194  		Context   *context.Context
   195  		Call      call
   196  		TxContext context.Context //nolint:containedctx
   197  		Tx        txInfo
   198  		Query     string
   199  	}
   200  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   201  	DatabaseSQLTxQueryDoneInfo struct {
   202  		Error error
   203  	}
   204  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   205  	DatabaseSQLTxExecStartInfo struct {
   206  		// Context make available context in trace callback function.
   207  		// Pointer to context provide replacement of context in trace callback function.
   208  		// Warning: concurrent access to pointer on client side must be excluded.
   209  		// Safe replacement of context are provided only inside callback function
   210  		Context   *context.Context
   211  		Call      call
   212  		TxContext context.Context //nolint:containedctx
   213  		Tx        txInfo
   214  		Query     string
   215  	}
   216  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   217  	DatabaseSQLTxExecDoneInfo struct {
   218  		Error error
   219  	}
   220  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   221  	DatabaseSQLTxCommitStartInfo struct {
   222  		// TxContext make available context in trace callback function.
   223  		// Pointer to context provide replacement of context in trace callback function.
   224  		// Warning: concurrent access to pointer on client side must be excluded.
   225  		// Safe replacement of context are provided only inside callback function
   226  		Context *context.Context
   227  		Call    call
   228  		Tx      txInfo
   229  	}
   230  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   231  	DatabaseSQLTxCommitDoneInfo struct {
   232  		Error error
   233  	}
   234  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   235  	DatabaseSQLTxRollbackStartInfo struct {
   236  		// TxContext make available context in trace callback function.
   237  		// Pointer to context provide replacement of context in trace callback function.
   238  		// Warning: concurrent access to pointer on client side must be excluded.
   239  		// Safe replacement of context are provided only inside callback function
   240  		Context *context.Context
   241  		Call    call
   242  		Tx      txInfo
   243  	}
   244  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   245  	DatabaseSQLTxRollbackDoneInfo struct {
   246  		Error error
   247  	}
   248  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   249  	DatabaseSQLStmtCloseStartInfo struct {
   250  		StmtContext *context.Context
   251  		Call        call
   252  	}
   253  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   254  	DatabaseSQLStmtCloseDoneInfo struct {
   255  		Error error
   256  	}
   257  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   258  	DatabaseSQLStmtQueryStartInfo struct {
   259  		// Context make available context in trace callback function.
   260  		// Pointer to context provide replacement of context in trace callback function.
   261  		// Warning: concurrent access to pointer on client side must be excluded.
   262  		// Safe replacement of context are provided only inside callback function
   263  		Context     *context.Context
   264  		Call        call
   265  		StmtContext context.Context //nolint:containedctx
   266  		Query       string
   267  	}
   268  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   269  	DatabaseSQLStmtQueryDoneInfo struct {
   270  		Error error
   271  	}
   272  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   273  	DatabaseSQLStmtExecStartInfo struct {
   274  		// Context make available context in trace callback function.
   275  		// Pointer to context provide replacement of context in trace callback function.
   276  		// Warning: concurrent access to pointer on client side must be excluded.
   277  		// Safe replacement of context are provided only inside callback function
   278  		Context     *context.Context
   279  		Call        call
   280  		StmtContext context.Context //nolint:containedctx
   281  		Query       string
   282  	}
   283  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   284  	DatabaseSQLStmtExecDoneInfo struct {
   285  		Error error
   286  	}
   287  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   288  	DatabaseSQLDoTxStartInfo struct {
   289  		// Context make available context in trace callback function.
   290  		// Pointer to context provide replacement of context in trace callback function.
   291  		// Warning: concurrent access to pointer on client side must be excluded.
   292  		// Safe replacement of context are provided only inside callback function
   293  		Context    *context.Context
   294  		Call       call
   295  		ID         string
   296  		Idempotent bool
   297  	}
   298  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   299  	DatabaseSQLDoTxIntermediateInfo struct {
   300  		Error error
   301  	}
   302  	// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals
   303  	DatabaseSQLDoTxDoneInfo struct {
   304  		Attempts int
   305  		Error    error
   306  	}
   307  )