Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.

You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated version of this page

Learn how to upgrade to the latest version.

SqlManagement domain

SqlManagement Commands

AddSqlRequestCommand

PrestaShop\PrestaShop\Core\Domain\SqlManagement\Command\AddSqlRequestCommand This command creates new SqlRequest entity with provided data.

Command details
Constructor parameters
  • $string $name
  • $string $sql
Handler class PrestaShop\PrestaShop\Adapter\SqlManager\CommandHandler\AddSqlRequestHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\SqlManagement\CommandHandler\AddSqlRequestHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\SqlManagement\ValueObject\SqlRequestId

BulkDeleteSqlRequestCommand

PrestaShop\PrestaShop\Core\Domain\SqlManagement\Command\BulkDeleteSqlRequestCommand Class BulkDeleteSqlRequestCommand deletes provided SqlRequests.

Command details
Constructor parameters
  • $array $sqlRequestIds
Handler class PrestaShop\PrestaShop\Adapter\SqlManager\CommandHandler\BulkDeleteSqlRequestHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\SqlManagement\CommandHandler\BulkDeleteSqlRequestHandlerInterface
Return type void

DeleteSqlRequestCommand

PrestaShop\PrestaShop\Core\Domain\SqlManagement\Command\DeleteSqlRequestCommand Class DeleteSqlRequestCommand command delete SqlRequest by given id.

Command details
Constructor parameters
  • $PrestaShop\PrestaShop\Core\Domain\SqlManagement\ValueObject\SqlRequestId $sqlRequestId
Handler class PrestaShop\PrestaShop\Adapter\SqlManager\CommandHandler\DeleteSqlRequestHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\SqlManagement\CommandHandler\DeleteSqlRequestHandlerInterface
Return type void

EditSqlRequestCommand

PrestaShop\PrestaShop\Core\Domain\SqlManagement\Command\EditSqlRequestCommand This command modifies an existing SqlRequest object, replacing its data by the provided one.

Command details
Constructor parameters
  • $PrestaShop\PrestaShop\Core\Domain\SqlManagement\ValueObject\SqlRequestId $sqlRequestId
Handler class PrestaShop\PrestaShop\Adapter\SqlManager\CommandHandler\EditSqlRequestHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\SqlManagement\CommandHandler\EditSqlRequestHandlerInterface
Return type void

SaveSqlRequestSettingsCommand

PrestaShop\PrestaShop\Core\Domain\SqlManagement\Command\SaveSqlRequestSettingsCommand Class SaveSqlManagerSettingsCommand saves default file encoding settings for SqlRequest's query result export file.

Command details
Constructor parameters
  • $string $fileEncoding
Handler class PrestaShop\PrestaShop\Core\Domain\SqlManagement\CommandHandler\SaveSqlRequestSettingsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\SqlManagement\CommandHandler\SaveSqlRequestSettingsHandlerInterface
Return type void

SqlManagement Queries

GetDatabaseTableFieldsList

PrestaShop\PrestaShop\Core\Domain\SqlManagement\Query\GetDatabaseTableFieldsList Class GetAttributesForDatabaseTableQuery gets list of attributes for given database table name.

Query details
Constructor parameters
  • $string $tableName
Handler class PrestaShop\PrestaShop\Adapter\SqlManager\QueryHandler\GetDatabaseTableFieldsListHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\SqlManagement\QueryHandler\GetDatabaseTableFieldsListHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\SqlManagement\DatabaseTableFields

GetDatabaseTablesList

PrestaShop\PrestaShop\Core\Domain\SqlManagement\Query\GetDatabaseTablesList Class GetDatabaseTablesListQuery gets list of database tables.

Query details
Constructor parameters
    Handler class PrestaShop\PrestaShop\Adapter\SqlManager\QueryHandler\GetDatabaseTablesListHandler

    Implements:

    • PrestaShop\PrestaShop\Core\Domain\SqlManagement\QueryHandler\GetDatabaseTablesListHandlerInterface
    Return type PrestaShop\PrestaShop\Core\Domain\SqlManagement\DatabaseTablesList

    GetSqlRequestExecutionResult

    PrestaShop\PrestaShop\Core\Domain\SqlManagement\Query\GetSqlRequestExecutionResult Class GetSqlRequestExecutionResultQuery returns the result of executing an SqlRequest query.

    Query details
    Constructor parameters
    • $int $requestSqlId
    Handler class PrestaShop\PrestaShop\Adapter\SqlManager\QueryHandler\GetSqlRequestExecutionResultHandler

    Implements:

    • PrestaShop\PrestaShop\Core\Domain\SqlManagement\QueryHandler\GetSqlRequestExecutionResultHandlerInterface
    Return type PrestaShop\PrestaShop\Core\Domain\SqlManagement\SqlRequestExecutionResult

    GetSqlRequestForEditing

    PrestaShop\PrestaShop\Core\Domain\SqlManagement\Query\GetSqlRequestForEditing Class GetSqlRequestForEditingQuery gets SqlRequest data that can be edited.

    Query details
    Constructor parameters
    • $int $requestSqlId
    Handler class PrestaShop\PrestaShop\Adapter\SqlManager\QueryHandler\GetSqlRequestForEditingHandler

    Implements:

    • PrestaShop\PrestaShop\Core\Domain\SqlManagement\QueryHandler\GetSqlRequestForEditingHandlerInterface
    Return type PrestaShop\PrestaShop\Core\Domain\SqlManagement\EditableSqlRequest

    GetSqlRequestSettings

    PrestaShop\PrestaShop\Core\Domain\SqlManagement\Query\GetSqlRequestSettings Class GetSqlRequestSettingsQuery gets SqlRequest settings.

    Query details
    Constructor parameters
      Handler class PrestaShop\PrestaShop\Core\Domain\SqlManagement\QueryHandler\GetSqlRequestSettingsHandler

      Implements:

      • PrestaShop\PrestaShop\Core\Domain\SqlManagement\QueryHandler\GetSqlRequestSettingsHandlerInterface
      Return type PrestaShop\PrestaShop\Core\Domain\SqlManagement\SqlRequestSettings