Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class ExportContext.
Database instance export context.
Generated from protobuf message google.cloud.sql.v1.ExportContext
Namespace
Google \ Cloud \ Sql \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ uri
string
The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the request succeeds, but the operation fails. If fileTypeis SQLand the filename ends with .gz, the contents are compressed.
↳ databases
array
Databases to be exported. * MySQL instances:If fileTypeis SQLand no database is specified, all databases are exported, except for the mysqlsystem database. If fileTypeis CSV, you can specify one database, either by using this property or by using the csvExportOptions.selectQueryproperty, which takes precedence over this property. * PostgreSQL instances:You must specify one database to be exported. If fileTypeis CSV, this database must match the one specified in the csvExportOptions.selectQueryproperty. * SQL Server instances:You must specify one database to be exported, and the fileTypemust be BAK.
↳ kind
string
This is always sql#exportContext.
↳ sql_export_options
↳ csv_export_options
Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions
Options for exporting data as CSV. MySQLand PostgreSQLinstances only.
↳ file_type
int
The file type for the specified uri. * SQL: The file contains SQL statements. * CSV: The file contains CSV data. * BAK: The file contains backup data for a SQL Server instance.
↳ offload
getUri
The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the request succeeds, but the operation fails. If fileTypeis SQLand the filename ends with .gz, the contents are compressed.
string
setUri
The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the request succeeds, but the operation fails. If fileTypeis SQLand the filename ends with .gz, the contents are compressed.
var
string
$this
getDatabases
Databases to be exported.
- MySQL instances:If fileTypeis SQLand no database is specified, all databases are exported, except for the mysqlsystem database. If fileTypeis CSV, you can specify one database, either by using this property or by using the csvExportOptions.selectQueryproperty, which takes precedence over this property.
- PostgreSQL instances:You must specify one database to be exported. If fileTypeis CSV, this database must match the one specified in the csvExportOptions.selectQueryproperty.
- SQL Server instances:You must specify one database to be exported, and the fileTypemust be BAK.
setDatabases
Databases to be exported.
- MySQL instances:If fileTypeis SQLand no database is specified, all databases are exported, except for the mysqlsystem database. If fileTypeis CSV, you can specify one database, either by using this property or by using the csvExportOptions.selectQueryproperty, which takes precedence over this property.
- PostgreSQL instances:You must specify one database to be exported. If fileTypeis CSV, this database must match the one specified in the csvExportOptions.selectQueryproperty.
- SQL Server instances:You must specify one database to be exported, and the fileTypemust be BAK.
var
string[]
$this
getKind
This is always sql#exportContext.
string
setKind
This is always sql#exportContext.
var
string
$this
getSqlExportOptions
Options for exporting data as SQL statements.
hasSqlExportOptions
clearSqlExportOptions
setSqlExportOptions
Options for exporting data as SQL statements.
$this
getCsvExportOptions
Options for exporting data as CSV. MySQLand PostgreSQLinstances only.
hasCsvExportOptions
clearCsvExportOptions
setCsvExportOptions
Options for exporting data as CSV. MySQLand PostgreSQLinstances only.
$this
getFileType
The file type for the specified uri.
- SQL: The file contains SQL statements.
- CSV: The file contains CSV data.
- BAK: The file contains backup data for a SQL Server instance.
int
setFileType
The file type for the specified uri.
- SQL: The file contains SQL statements.
- CSV: The file contains CSV data.
- BAK: The file contains backup data for a SQL Server instance.
var
int
$this
getOffload
Option for export offload.
hasOffload
clearOffload
getOffloadValue
Returns the unboxed value from getOffload()
Option for export offload.
bool|null
setOffload
Option for export offload.
$this
setOffloadValue
Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
Option for export offload.
var
bool|null
$this