PHP 클래스 Nette\Database\Helpers

저자: David Grudl
파일 보기 프로젝트 열기: nette/database 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$maxLength maximum SQL length
$typePatterns array

공개 메소드들

메소드 설명
createDebugPanel ( $connection, $explain = TRUE, $name = NULL )
detectType ( $type ) : string Heuristic column type detection.
detectTypes ( PDOStatement $statement ) : array Common column type detection.
dumpResult ( ResultSet $result ) : void Displays complete result set as HTML table for debug purposes.
dumpSql ( $sql, array $params = NULL, Connection $connection = NULL ) : string Returns syntax highlighted SQL command.
findDuplicates ( PDOStatement $statement ) : string Finds duplicate columns in select statement
loadFromFile ( Connection $connection, $file ) : integer Import SQL dump from file - extremely fast.
toPairs ( array $rows, $key = NULL, $value = NULL ) : array Reformat source to key -> value pairs.

메소드 상세

createDebugPanel() 공개 정적인 메소드

public static createDebugPanel ( $connection, $explain = TRUE, $name = NULL )

detectType() 공개 정적인 메소드

Heuristic column type detection.
public static detectType ( $type ) : string
리턴 string

detectTypes() 공개 정적인 메소드

Common column type detection.
public static detectTypes ( PDOStatement $statement ) : array
$statement PDOStatement
리턴 array

dumpResult() 공개 정적인 메소드

Displays complete result set as HTML table for debug purposes.
public static dumpResult ( ResultSet $result ) : void
$result ResultSet
리턴 void

dumpSql() 공개 정적인 메소드

Returns syntax highlighted SQL command.
public static dumpSql ( $sql, array $params = NULL, Connection $connection = NULL ) : string
$params array
$connection Connection
리턴 string

findDuplicates() 공개 정적인 메소드

Finds duplicate columns in select statement
public static findDuplicates ( PDOStatement $statement ) : string
$statement PDOStatement
리턴 string

loadFromFile() 공개 정적인 메소드

Import SQL dump from file - extremely fast.
public static loadFromFile ( Connection $connection, $file ) : integer
$connection Connection
리턴 integer count of commands

toPairs() 공개 정적인 메소드

Reformat source to key -> value pairs.
public static toPairs ( array $rows, $key = NULL, $value = NULL ) : array
$rows array
리턴 array

프로퍼티 상세

$maxLength 공개적으로 정적으로 프로퍼티

maximum SQL length
public static $maxLength

$typePatterns 공개적으로 정적으로 프로퍼티

public static array $typePatterns
리턴 array