github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/sql/sessiondatapb/session_migration.proto (about)

     1  // Copyright 2021 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  syntax = "proto3";
    12  package cockroach.sql.sessiondatapb;
    13  option go_package = "github.com/cockroachdb/cockroach/pkg/sql/sessiondatapb";
    14  
    15  import "gogoproto/gogo.proto";
    16  import "sql/sessiondatapb/session_data.proto";
    17  import "sql/sessiondatapb/local_only_session_data.proto";
    18  
    19  // MigratableSession represents a serialization of a session that can be
    20  // migrated between SQL sessions.
    21  message MigratableSession {
    22    cockroach.sql.sessiondatapb.SessionData session_data = 1 [(gogoproto.nullable)=false];
    23    cockroach.sql.sessiondatapb.LocalOnlySessionData local_only_session_data = 2 [(gogoproto.nullable)=false];
    24  
    25    // PreparedStatement represents a prepared statement in a migratable session.
    26    message PreparedStatement {
    27      string name = 1;
    28      repeated uint32 placeholder_type_hints = 2 [
    29        (gogoproto.customtype)="github.com/lib/pq/oid.Oid"
    30      ];
    31      string sql = 3 [(gogoproto.customname)="SQL"];
    32    }
    33    repeated PreparedStatement prepared_statements = 3 [(gogoproto.nullable)=false];
    34  
    35  }