setQuoteId() 공개 메소드

Set the quote ID type
public setQuoteId ( integer $type = Pop\Db\Sql::NO_QUOTE ) : Sql
$type integer
리턴 Sql
예제 #1
0
 public function testQuoteId()
 {
     $s = new Sql(Db::factory('Sqlite', array('database' => __DIR__ . '/../tmp/test.sqlite')), 'users');
     $this->assertEquals('"users"', $s->quoteId('users'));
     $this->assertEquals('"users"."id"', $s->quoteId('users.id'));
     $s->setQuoteId(Sql::BACKTICK);
     $this->assertEquals('`users`', $s->quoteId('users'));
     $this->assertEquals('`users`.`id`', $s->quoteId('users.id'));
     $s->setQuoteId(Sql::BRACKET);
     $this->assertEquals('[users]', $s->quoteId('users'));
     $this->assertEquals('[users].[id]', $s->quoteId('users.id'));
 }