<commit_before>// Master akiban_information_schema protobuf description file

package akiban_schema.protobuf;
option java_package = "com.akiban.ais.protobuf";
option java_outer_classname = "AISProtobuf";

// The AIS Types are statically generated in akiban server in 
// com.akiban.ais.model.Types. The AIS message needs to include the types
// to send them to the Akiban Adapter, where they are used to create and 
// parse Rows. 
message Type {
   optional string typeName     = 1;  // name of the type
   optional int32  parameters   = 2;  // number of parameters used in the column
   optional bool   fixedSize    = 3;  // Does the type of fixed size 
                                      // (false for variable width types)
   optional int32  maxSizeBytes = 4;  // maximum size of the type in bytes
}

message TableName {
    optional string schemaName = 1;
    optional string tableName  = 2;
}

enum JoinType {
   LEFT_OUTER_JOIN  = 0;
   RIGHT_OUTER_JOIN = 1;
   FULL_OUTER_JOIN  = 2;
   INNER_JOIN       = 3;
}

// One of the column pairs which define the Join.
message JoinColumn {
   optional string parentColumn = 1;
   optional string childColumn  = 2;
   optional int32  position     = 3;
}

message Join {
    optional TableName  childTable  = 1;  // Child table for this join. 
                                          // Parent table is the list source
    optional JoinType   joinType    = 2;  // Type of join to child table
    repeated JoinColumn columns     = 3;  // list of columns for this join

}

message IndexColumn {
    optional string  columnName = 1;  // links to Column.columnName 
    optional bool    ascending  = 2;  // sort order of the column 
                                      // true for ascending, false for descending
    optional int32   position   = 3;  // order of the column in the index
}

message Index {
    optional string   indexName = 1;
    optional string   treeName  = 2;  // storage system tree name 
    optional int32    indexId   = 3;  // id of index within table/group
    optional bool     isPK      = 4;
    optional bool     isUnique  = 5;
    optional bool     isFK      = 6;
    optional bool     isAkFK    = 7;
    repeated IndexColumn columns     = 8;
    optional string      description = 9;
    optional JoinType  joinType = 10; // Type of join used for GroupIndex
}

// The groupName is derived from the root table schema/table name
// Therefore the name points to root table in the tables list
// The list of indexes on the Group are the list of GroupIndexes
// for this group.
message Group {
   optional string rootTableName = 1;  // Root Table for this group
   optional string treeName      = 2;  // storage system tree name  
   repeated Index  indexes       = 3;  // list of Group indexes 
}

// Column in a Table
message Column {
    optional string  columnName   = 1;
    optional string  typeName     = 2;  // links to Types.typeName
    optional bool    isNullable   = 3;
    optional int32   position     = 4;  // order of column in Table 
    optional int64   typeParam1   = 5;  
    optional int64   typeParam2   = 6;
    optional int64   initAutoInc  = 7;  // initial auto increment value
    optional string  characterSet = 8;
    optional string  collation    = 9;    
    optional string  description  = 10;
}

// UserTable.  
// GroupTables are derived from the root table and the
// list of joins (if any)
message Table {
    optional string  tableName    = 1;
    optional int32   tableId      = 2;  // globally unique id for table
    optional int32   ordinal      = 3;  // id of table within the group
    repeated Column  columns      = 4;
    optional string  characterSet = 5;
    optional string  collation    = 6;    
    repeated Index   indexes      = 7;  // list of indexes on the table
    repeated Join    childTables  = 8;  // list of joins to child tables
    optional string  description  = 9;  // Table comment holder
    optional bool    protected    = 10; // Table can not be altered or joined
}

message Schema {
    optional string schemaName   = 1;
    optional Table  tables       = 2;  // list of user tables in the schema
    repeated Group  groups       = 3;  // list of groups in the schema<commit_msg>Update some comments.<commit_after>// Master akiban_information_schema protobuf description file

package akiban_schema.protobuf;
option java_package = "com.akiban.ais.protobuf";
option java_outer_classname = "AISProtobuf";

// The AIS Types are statically generated in akiban server in 
// com.akiban.ais.model.Types. The AIS message needs to include the types
// to send them to the Akiban Adapter, where they are used to create and 
// parse Rows. 
message Type {
   optional string typeName     = 1;  // name of the type
   optional int32  parameters   = 2;  // number of parameters used in the column
   optional bool   fixedSize    = 3;  // Does the type of fixed size 
                                      // (false for variable width types)
   optional int32  maxSizeBytes = 4;  // maximum size of the type in bytes
}

message TableName {
    optional string schemaName = 1;
    optional string tableName  = 2;
}

enum JoinType {
   LEFT_OUTER_JOIN  = 0;
   RIGHT_OUTER_JOIN = 1;
   FULL_OUTER_JOIN  = 2;
   INNER_JOIN       = 3;
}

// One of the column pairs which define the Join.
message JoinColumn {
   optional string parentColumn = 1;
   optional string childColumn  = 2;
   optional int32  position     = 3;
}

message Join {
    optional TableName  childTable  = 1;  // Child table for this join. 
                                          // Parent table is the list source
                                          // link to Table.tableName
    optional JoinType   joinType    = 2;  // Type of join to child table
    repeated JoinColumn columns     = 3;  // list of columns for this join

}

message IndexColumn {
    optional string  columnName = 1;  // links to Column.columnName 
    optional bool    ascending  = 2;  // sort order of the column 
                                      // true for ascending, false for descending
    optional int32   position   = 3;  // order of the column in the index
}

message Index {
    optional string   indexName = 1;
    optional string   treeName  = 2;  // storage system tree name 
    optional int32    indexId   = 3;  // id of index within table/group
    optional bool     isPK      = 4;
    optional bool     isUnique  = 5;
    optional bool     isFK      = 6;
    optional bool     isAkFK    = 7;
    repeated IndexColumn columns     = 8;
    optional string      description = 9;
    optional JoinType  joinType = 10; // Type of join used for GroupIndex
}

message Group {
   optional string rootTableName = 1;  // Root Table for this group
                                       // link to Table.tableName
   optional string treeName      = 2;  // storage system tree name  
   repeated Index  indexes       = 3;  // list of Group indexes 
}

// Column in a Table
message Column {
    optional string  columnName   = 1;
    optional string  typeName     = 2;  // link to Types.typeName
    optional bool    isNullable   = 3;
    optional int32   position     = 4;  // order of column in Table 
    optional int64   typeParam1   = 5;  
    optional int64   typeParam2   = 6;
    optional int64   initAutoInc  = 7;  // initial auto increment value
    optional string  characterSet = 8;
    optional string  collation    = 9;    
    optional string  description  = 10;
}

// UserTable.  
// GroupTables are derived from the root table and the
// list of joins (if any)
message Table {
    optional string  tableName    = 1;
    optional int32   tableId      = 2;  // globally unique id for table
    optional int32   ordinal      = 3;  // id of table within the group
    repeated Column  columns      = 4;
    optional string  characterSet = 5;
    optional string  collation    = 6;    
    repeated Index   indexes      = 7;  // list of indexes on the table
    repeated Join    childTables  = 8;  // list of joins to child tables
    optional string  description  = 9;  // Table comment holder
    optional bool    protected    = 10; // Table can not be altered or joined
}

message Schema {
    optional string schemaName   = 1;
    optional Table  tables       = 2;  // list of user tables in the schema
    repeated Group  groups       = 3;  // list of groups in the schema
{'fraction_non_alphanumeric': 0.06051563619002148, 'fraction_numerical': 0.01957507758414896, 'mean_word_length': 2.0953084595493165, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2645144', 'n_tokens_mistral': 2445, 'n_tokens_neox': 2262, 'n_words': 983}