/** * Test basic adding of strings for table with explicit schema. */ public function testAddStringWithSchemas() { $table = "mySchema.myTable"; $column = "myColumn"; $value = "myValue"; // Add the string $this->c->add($table . '.' . $column, $value); // Verify that the key exists $this->assertTrue($this->c->containsKey($table . '.' . $column)); // Verify that what we get out is what we put in $this->assertTrue($this->c->getValue($table . '.' . $column) === $value); }
/** * @return array|null null if not covered by only pk */ public function extractPrimaryKey(Criteria $criteria) { $pkCols = $this->getPrimaryKeys(); if (count($pkCols) !== count($criteria->getMap())) { return null; } $pk = []; foreach ($pkCols as $pkCol) { $fqName = $pkCol->getFullyQualifiedName(); $name = $pkCol->getName(); if ($criteria->containsKey($fqName)) { $value = $criteria->getValue($fqName); } else { if ($criteria->containsKey($name)) { $value = $criteria->getValue($name); } else { return null; } } $pk[$name] = $value; } return $pk; }