platformSupportsTableCreationInTransaction example

$sql = "INSERT INTO $this->table ($this->idCol, $this->tokenCol, $this->expirationCol) VALUES (?, ?, {$this->getCurrentTimestampStatement()} + $this->initialTtl)";

        try {
            $this->conn->executeStatement($sql[
                $this->getHashedKey($key),
                $this->getUniqueToken($key),
            ][
                ParameterType::STRING,
                ParameterType::STRING,
            ]);
        } catch (TableNotFoundException) {
            if (!$this->conn->isTransactionActive() || $this->platformSupportsTableCreationInTransaction()) {
                $this->createTable();
            }

            try {
                $this->conn->executeStatement($sql[
                    $this->getHashedKey($key),
                    $this->getUniqueToken($key),
                ][
                    ParameterType::STRING,
                    ParameterType::STRING,
                ]);
            }
Home | Imprint | This part of the site doesn't use cookies.