Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403]

SQLite3 driver

Copyright: 2000-2013 John Lim
Copyright: 2014 Damien Regad, Mark Newnham and the ADOdb community
License: BSD-3-Clause
License: LGPL-2.1-or-later
File Size: 810 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 classes

ADODB_sqlite3:: (30 methods):
  ServerInfo()
  BeginTrans()
  CommitTrans()
  RollbackTrans()
  metaType()
  MetaColumns()
  metaForeignKeys()
  _init()
  _insertID()
  _affectedrows()
  ErrorMsg()
  ErrorNo()
  SQLDate()
  _createFunctions()
  _connect()
  _pconnect()
  _query()
  SelectLimit()
  GenID()
  createSequence()
  DropSequence()
  _close()
  metaIndexes()
  charMax()
  textMax()
  month()
  day()
  year()
  updateBlob()
  updateBlobFile()

Name:: (0 methods):

ADORecordset_sqlite3:: (7 methods):
  __construct()
  FetchField()
  _initrs()
  Fields()
  _seek()
  _fetch()
  _close()


Class: ADODB_sqlite3  - X-Ref

Class ADODB_sqlite3

ServerInfo()   X-Ref
No description

BeginTrans()   X-Ref
No description

CommitTrans($ok=true)   X-Ref
No description

RollbackTrans()   X-Ref
No description

metaType($t,$len=-1,$fieldobj=false)   X-Ref
No description

MetaColumns($table, $normalize=true)   X-Ref
No description

metaForeignKeys($table, $owner = '', $upper = false, $associative = false)   X-Ref
No description

_init($parentDriver)   X-Ref
No description

_insertID($table = '', $column = '')   X-Ref
No description

_affectedrows()   X-Ref
No description

ErrorMsg()   X-Ref
No description

ErrorNo()   X-Ref
No description

SQLDate($fmt, $col=false)   X-Ref
No description

_createFunctions()   X-Ref
No description

_connect($argHostname, $argUsername, $argPassword, $argDatabasename)   X-Ref
No description

_pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)   X-Ref
No description

_query($sql,$inputarr=false)   X-Ref
No description

SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)   X-Ref
No description

GenID($seq='adodbseq',$start=1)   X-Ref
No description

createSequence($seqname='adodbseq', $startID=1)   X-Ref
No description

DropSequence($seqname = 'adodbseq')   X-Ref
No description

_close()   X-Ref
No description

metaIndexes($table, $primary = FALSE, $owner = false)   X-Ref
No description

charMax()   X-Ref
Returns the maximum size of a MetaType C field. Because of the
database design, sqlite places no limits on the size of data inserted

return: int

textMax()   X-Ref
Returns the maximum size of a MetaType X field. Because of the
database design, sqlite places no limits on the size of data inserted

return: int

month($fld)   X-Ref
Converts a date to a month only field and pads it to 2 characters

This uses the more efficient strftime native function to process

param: string $fld    The name of the field to process
return: string The SQL Statement

day($fld)   X-Ref
Converts a date to a day only field and pads it to 2 characters

This uses the more efficient strftime native function to process

param: string $fld    The name of the field to process
return: string The SQL Statement

year($fld)   X-Ref
Converts a date to a year only field

This uses the more efficient strftime native function to process

param: string $fld    The name of the field to process
return: string The SQL Statement

updateBlob($table, $column, $val, $where, $blobtype = 'BLOB')   X-Ref
SQLite update for blob

SQLite must be a fully prepared statement (all variables must be bound),
so $where can either be an array (array params) or a string that we will
do our best to unpack and turn into a prepared statement.

param: string $table
param: string $column
param: string $val      Blob value to set
param: mixed  $where    An array of parameters (key => value pairs),
param: string $blobtype ignored
return: bool success

updateBlobFile($table, $column, $path, $where, $blobtype = 'BLOB')   X-Ref
SQLite update for blob from a file

param: string $table
param: string $column
param: string $path      Filename containing blob data
param: mixed  $where    {@see updateBlob()}
param: string $blobtype ignored
return: bool success

Class: Name  - X-Ref

Class: ADORecordset_sqlite3  - X-Ref

__construct($queryID,$mode=false)   X-Ref
No description

FetchField($fieldOffset = -1)   X-Ref
No description

_initrs()   X-Ref
No description

Fields($colname)   X-Ref
No description

_seek($row)   X-Ref
No description

_fetch($ignore_fields=false)   X-Ref
No description

_close()   X-Ref
No description