Nextcloud PHP API (master)

ISchemaWrapper

This interface allows to get information about the database schema.

This is particularly helpful for database migration scripts.

This interface must not be implemented in your application but instead can be obtained in your migration scripts with the $schemaClosure Closure.

Tags
since
13.0.0

Table of Contents

Methods

createTable()  : Table
Creates a new table.
dropTable()  : Schema
Drops a table from the schema.
getDatabasePlatform()  : AbstractPlatform
Gets the DatabasePlatform for the database.
getTable()  : Table
getTableNames()  : array<string|int, mixed>
Gets all table names, prefixed with table prefix
getTableNamesWithoutPrefix()  : array<string|int, mixed>
Gets all table names
getTables()  : array<string|int, Table>
Gets all tables of this schema.
hasTable()  : bool
Does this schema have a table with the given name?

Methods

createTable()

Creates a new table.

public createTable(string $tableName) : Table
Parameters
$tableName : string

Prefix is automatically prepended

Tags
since
13.0.0
Return values
Table

dropTable()

Drops a table from the schema.

public dropTable(string $tableName) : Schema
Parameters
$tableName : string

Prefix is automatically prepended

Tags
since
13.0.0
Return values
Schema

getDatabasePlatform()

Gets the DatabasePlatform for the database.

public getDatabasePlatform() : AbstractPlatform
Tags
throws
Exception
since
23.0.0
Return values
AbstractPlatform

getTable()

public getTable(string $tableName) : Table
Parameters
$tableName : string
Tags
throws
SchemaException
since
13.0.0
Return values
Table

getTableNames()

Gets all table names, prefixed with table prefix

public getTableNames() : array<string|int, mixed>
Tags
since
13.0.0
Return values
array<string|int, mixed>

getTableNamesWithoutPrefix()

Gets all table names

public getTableNamesWithoutPrefix() : array<string|int, mixed>
Tags
since
13.0.0
Return values
array<string|int, mixed>

getTables()

Gets all tables of this schema.

public getTables() : array<string|int, Table>
Tags
since
13.0.0
Return values
array<string|int, Table>

hasTable()

Does this schema have a table with the given name?

public hasTable(string $tableName) : bool
Parameters
$tableName : string

Prefix is automatically prepended

Tags
since
13.0.0
Return values
bool

        
On this page

Search results