本文整理匯總了Golang中github.com/cockroachdb/cockroach/sql.MetadataSchema類的典型用法代碼示例。如果您正苦於以下問題:Golang MetadataSchema類的具體用法?Golang MetadataSchema怎麽用?Golang MetadataSchema使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了MetadataSchema類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: AddEventLogToMetadataSchema
// AddEventLogToMetadataSchema adds the range event log table to the supplied
// MetadataSchema.
func AddEventLogToMetadataSchema(schema *sql.MetadataSchema) {
schema.AddTable(keys.RangeEventTableID, rangeEventTableSchema, privilege.List{privilege.ALL})
}
示例2: AddEventLogToMetadataSchema
// AddEventLogToMetadataSchema adds the range event log table to the supplied
// MetadataSchema.
func AddEventLogToMetadataSchema(schema *sql.MetadataSchema) {
allPrivileges := sql.NewPrivilegeDescriptor(security.RootUser, privilege.List{privilege.ALL})
schema.AddTable(rangeEventTableSchema, allPrivileges)
}
示例3: AddEventLogToMetadataSchema
// AddEventLogToMetadataSchema adds the range event log table to the supplied
// MetadataSchema.
func AddEventLogToMetadataSchema(schema *sql.MetadataSchema) {
allPrivileges := sql.NewPrivilegeDescriptor(security.RootUser, privilege.List{privilege.ALL})
db := sql.MakeMetadataDatabase("rangelog", allPrivileges)
db.AddTable(rangeEventTableSchema, allPrivileges)
schema.AddDatabase(db)
}