EDB
[ class tree: EDB ] [ index: EDB ] [ all elements ]

Class: EDB_SQLITE2

Source Location: /EDB/EDB/EDB_SQLITE2.php

Class Overview

EDB_Common
   |
   --EDB_SQLITE2

SQLite2 engine for EDB API


Methods


Inherited Variables

Inherited Methods

Class: EDB_Common

EDB_Common::bind_param()
replace bind parameters to parameter's value
EDB_Common::check_param()
Check parameter type and parameters
EDB_Common::file_exists()
Checks whether a file or directory exists
EDB_Common::get_param_number()
Get number of query parameters
EDB_Common::switch_freemark()
Change free marking

Class Details

[line 27]
SQLite2 engine for EDB API

This class support abstracttion DB layer for SQLite3 Engine




[ Top ]


Class Methods


constructor __construct [line 72]

EDB_SQLITE2 __construct( string $path, integer $mode)

Instantiates an EDB_SQLITE2 object and opens an SQLite 3 database

For examples:

  1.  $db new EDB_SQLITE2 ('sqlite2:///path/file.db');
  2.  $db new EDB_SQLITE2 ('sqlite2:///path/file.db'0666)

If you add prefix 'p~' before host, you can connect with persistent connection.

For Examples:

  1.  $db new EDB_SQLTE2 ('sqlite2://p~/path/file.db');




Tags:

access:  public


Parameters:

string   $path   sqlite2 database file
integer   $mode   The mode of the file. Intended to be used to open the database in read-only mode. Presently, this parameter is ignored by the sqlite library. The default value for mode is the octal value 0666 and this is the recommended value.

[ Top ]

destructor __destruct [line 482]

void __destruct( )



[ Top ]

method close [line 403]

void close( )

Close the db handle



Tags:

access:  public


[ Top ]

method escape [line 146]

string escape( string $string)

Escape special characters in a string for use in an SQL statement



Tags:

access:  public


Parameters:

string   $string   The string that is to be escaped.

[ Top ]

method fetch [line 247]

object The fetch( [boolean $free = false])

Fetch a result row as an associative object



Tags:

return:  object of fetched a result row or false
access:  public


Parameters:

boolean   $free   (optional) fetch 수행 후 result를 free한다. (기본값: false) EDB >= 2.0.3

[ Top ]

method fetch_all [line 269]

array fetch_all( [boolean $free = true])

Fetch all result rows as an associative object



Tags:

return:  The fetched result rows
access:  public


Parameters:

boolean   $free   (optional) free result set after fetch. Defaluts is true.

[ Top ]

method field_name [line 315]

string|false field_name( integer $index)

Get the name of the specified field in a result

Given the ordinal column number, field_index, sqlite_field_name() returns the name of that field in the result set result.




Tags:



Parameters:

integer   $index   The numerical field offset. The index starts at 0.

[ Top ]

method field_type [line 337]

string|false field_type( integer $index, string $table)

Get the type of the specified field in a result



Tags:



Parameters:

integer   $index   The numerical field offset. The index starts at 0.
string   $table   name of table

[ Top ]

method free_result [line 290]

boolean free_result( )

Frees stored result memory for the given statement handle



Tags:

return:  always returns true
access:  public


[ Top ]

method get_charset [line 114]

string get_charset( )

Get character set of current database

This method is not allow on SQLite2 Engine




Tags:

return:  Current character set name
access:  public


[ Top ]

method lastId [line 212]

int|false lastId( )

가장 마지막 입력 row ID를 반환한다.



Tags:

since:  2.0.4
access:  public


[ Top ]

method num_fields [line 357]

integer|false num_fields( )

Returns the number of fields in the result set.



Tags:

access:  public


[ Top ]

method query [line 173]

integer query( string $query, string $type, mixed $param1, mixed $param2,...)

Performs a query on the database

Executes an SQL query, returning number of affected rows




Tags:

return:  The number of affected rows or false. If is not delete/insert/update query, always returns 0.
access:  public


Parameters:

string   $query   The query strings
string   $type   (optional) Bind parameter type. See also SQLite3Stmt::bindparam().
  1.  => integer SQLITE2_INTEGER
  2.  => double  SQLITE2_FLOAT
  3.  => string  SQLITE2_TEXT
  4.  => blob    SQLITE2_BLOB
  5.  => null    SQLITE2_NULL
mixed   $param1   (optional) Bind parameter 1
mixed   $param2,...   (optional) Bind parameter 2 ..

[ Top ]

method seek [line 225]

boolean seek( integer $offset)

Adjusts the result pointer to an arbitrary row in the result



Tags:

access:  public


Parameters:

integer   $offset   Must be between zero and the total number of rows minus one

[ Top ]

method set_charset [line 133]

bool set_charset( string $char)

Set character set of current database

This method is not allow on SQLite2 Engine, and always returns true




Tags:

return:  always returns true
access:  public


Parameters:

string   $char   name of character set that supported from database

[ Top ]

method trend [line 390]

void trend( [bool $v = true])

DB transaction 을 종료한다.



Tags:

access:  public


Parameters:

bool   $v   false일경우 rollback을 수행한다.

[ Top ]

method trstart [line 377]

void trstart( )

DB transaction 을 시작한다.



Tags:

access:  public


[ Top ]


Documentation generated on Tue, 14 May 2019 01:59:55 +0900 by phpDocumentor 1.4.4