protected function lockConnection(Connection $connection)
 {
     if ($connection->getPlatform() instanceof PostgreSqlPlatform) {
         Environment::lock('data-pgsql', TEMP_DIR);
     } else {
         Environment::lock('data-mysql', TEMP_DIR);
     }
 }
Beispiel #2
0
 protected function processAutoupdate(IEntity $entity, array $args)
 {
     $platform = $this->connection->getPlatform();
     if ($platform instanceof PostgreSqlPlatform) {
         $this->processPostgreAutoupdate($entity, $args);
     } else {
         $this->processMySQLAutoupdate($entity, $args);
     }
 }
 private function getForeignKeys($table)
 {
     return $this->cache->load($table . '.fkeys', function () use($table) {
         return $this->connection->getPlatform()->getForeignKeys($table);
     });
 }
Beispiel #4
0
 public function __construct(Connection $connection, Cache $cache)
 {
     $this->platform = $connection->getPlatform();
     $this->cache = $cache;
 }