MCPcopy Create free account
hub / github.com/apecloud/myduckserver / RenameTable

Method RenameTable

catalog/database.go:313–328  ·  view source on GitHub ↗

RenameTable implements sql.TableRenamer.

(ctx *sql.Context, oldName string, newName string)

Source from the content-addressed store, hash-verified

311 _, vv, ok := sql.SystemVariables.GetGlobal("replica_is_loading_snapshot")
312 if !ok {
313 return false
314 }
315 if b, ok := vv.(int8); ok {
316 return b != 0
317 }
318 return false
319}
320
321// CreateTable implements sql.TableCreator.
322func (d *Database) CreateTable(ctx *sql.Context, name string, schema sql.PrimaryKeySchema, collation sql.CollationID, comment string) error {
323 d.mu.Lock()
324 defer d.mu.Unlock()
325 return d.createAllTable(ctx, name, schema, collation, comment, false)
326}
327
328// CreateTemporaryTable implements sql.CreateTemporaryTable.
329func (d *Database) CreateTemporaryTable(ctx *sql.Context, name string, schema sql.PrimaryKeySchema, collation sql.CollationID) error {
330 d.mu.Lock()
331 defer d.mu.Unlock()

Callers

nothing calls this directly

Calls 4

ExecFunction · 0.92
FullTableNameFunction · 0.85

Tested by

no test coverage detected