Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:core:dao

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:core:dao [2026/09/26 09:09] – admin adminscriptlog:lib:core:dao [2026/09/26 09:34] (current) – admin admin
Line 14: Line 14:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Core Class | +| ''@category'' | Core Class | 
-  | ''@author'' | M.Noermoehammad | +| ''@author'' | M.Noermoehammad | 
-  | ''@license'' | MIT | +| ''@license'' | MIT | 
-  | ''@version'' | 1.0 | +| ''@version'' | 1.0 | 
-  | ''@since'' | Since Release 1.0 |+| ''@since'' | Since Release 1.0 |
  
 ======= Inheritance ======= ======= Inheritance =======
Line 29: Line 29:
 //None.// //None.//
  
-======= Properties (0) =======+======= Properties (5) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''protected'' | ''(untyped)'' | ''$dbc'' |  | 27 | 
 +| ''protected'' | ''(untyped)'' | ''$sql'' |  | 33 | 
 +| ''protected'' | ''(untyped)'' | ''$error'' |  | 39 | 
 +| ''protected'' | ''(untyped)'' | ''$sanitizing'' |  | 46 | 
 +| ''protected'' | ''(untyped)'' | ''$prefix'' |  | 52 |
  
 ======= Methods (18) ======= ======= Methods (18) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | (undocumented) | 54 | +| public | ''__construct()'' | (undocumented) | 54 | 
-  | protected | ''table()'' | Get prefixed table name | 75 | +| protected | ''table()'' | Get prefixed table name | 75 | 
-  | protected | ''setSQL()'' | setSQL | 86 | +| protected | ''setSQL()'' | setSQL | 86 | 
-  | protected | ''findAll()'' | Find All records | 100 | +| protected | ''findAll()'' | Find All records | 100 | 
-  | protected | ''findRow()'' | Find Single row record | 124 | +| protected | ''findRow()'' | Find Single row record | 124 | 
-  | protected | ''findColumn()'' | Find Column | 148 | +| protected | ''findColumn()'' | Find Column | 148 | 
-  | public | ''checkCountValue()'' | CheckCountValue function | 170 | +| public | ''checkCountValue()'' | CheckCountValue function | 170 | 
-  | protected | ''create()'' | Create records | 191 | +| protected | ''create()'' | Create records | 191 | 
-  | protected | ''modify()'' | Modify record | 204 | +| protected | ''modify()'' | Modify record | 204 | 
-  | protected | ''deleteRecord()'' | deleteRecord() | 220 | +| protected | ''deleteRecord()'' | deleteRecord() | 220 | 
-  | protected | ''replaceRecord()'' | replaceRecord() | 233 | +| protected | ''replaceRecord()'' | replaceRecord() | 233 | 
-  | protected | ''callTransaction()'' | callTransaction | 243 | +| protected | ''callTransaction()'' | callTransaction | 243 | 
-  | protected | ''callCommit()'' | callCommit | 253 | +| protected | ''callCommit()'' | callCommit | 253 | 
-  | protected | ''callRollBack()'' | callRollBack | 263 | +| protected | ''callRollBack()'' | callRollBack | 263 | 
-  | public | ''runInTransaction()'' | Run a callable inside a single database transaction. | 280 | +| public | ''runInTransaction()'' | Run a callable inside a single database transaction. | 280 | 
-  | protected | ''closeConnection()'' | closeConnection | 300 | +| protected | ''closeConnection()'' | closeConnection | 300 | 
-  | protected | ''lastId()'' | lastId | 311 | +| protected | ''lastId()'' | lastId | 311 | 
-  | protected | ''filteringId()'' | Filter and sanitize input values | 325 |+| protected | ''filteringId()'' | Filter and sanitize input values | 325 |
  
  
Line 77: Line 82:
 Get prefixed table name Get prefixed table name
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$table'' | ''(untyped)'' | //required// | //none// |+|  ''$table'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — string **Returns:** ''(none declared)'' — string
Line 93: Line 98:
 setSQL setSQL
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$sql'' | ''(untyped)'' | //required// | //none// |+|  ''$sql'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 111: Line 116:
 getting array of rows getting array of rows
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$data'' | ''array'' | ''array()'' | //none// | +|  ''$data'' |  ''array'' |  ''array()'' |  //none// | 
-  | ''$fetchMode'' | ''(untyped)'' | ''null'' | //none// |+|  ''$fetchMode'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — array<array-key, mixed> **Returns:** ''(none declared)'' — array<array-key, mixed>
Line 132: Line 137:
 getting one row getting one row
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$data'' | ''array'' | ''array()'' | //none// | +|  ''$data'' |  ''array'' |  ''array()'' |  //none// | 
-  | ''$fetchMode'' | ''(untyped)'' | ''null'' | //none// |+|  ''$fetchMode'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — mixed **Returns:** ''(none declared)'' — mixed
Line 154: Line 159:
 getting single field value getting single field value
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$data'' | ''array'' | ''array()'' | //none// | +|  ''$data'' |  ''array'' |  ''array()'' |  //none// | 
-  | ''$fetchMode'' | ''(untyped)'' | ''null'' | //none// |+|  ''$fetchMode'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — boolean false if no more rows **Returns:** ''(none declared)'' — boolean false if no more rows
Line 173: Line 178:
 CheckCountValue function CheckCountValue function
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$data'' | ''array'' | ''[]'' | //none// |+|  ''$data'' |  ''array'' |  ''[]'' |  //none// |
  
 **Returns:** ''int'' — int **Returns:** ''int'' — int
Line 191: Line 196:
 Create records Create records
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$table'' | ''(untyped)'' | //required// | //none// | +|  ''$table'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$params'' | ''(untyped)'' | //required// | //none// |+|  ''$params'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 208: Line 213:
 Modify record Modify record
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$table'' | ''(untyped)'' | //required// | //none// | +|  ''$table'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$params'' | ''(untyped)'' | //required// | //none// | +|  ''$params'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$where'' | ''(untyped)'' | //required// | //none// |+|  ''$where'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 229: Line 234:
 are removed; otherwise at most $limit rows are deleted. are removed; otherwise at most $limit rows are deleted.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$table'' | ''(untyped)'' | //required// | //none// | +|  ''$table'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$where'' | ''(untyped)'' | //required// | //none// | +|  ''$where'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$limit'' | ''?int'' | ''1'' | Maximum rows to delete, or null to delete all |+|  ''$limit'' |  ''?int'' |  ''1'' |  Maximum rows to delete, or null to delete all |
  
 **Returns:** ''(none declared)'' — int Number of rows deleted **Returns:** ''(none declared)'' — int Number of rows deleted
Line 247: Line 252:
 replaceRecord() replaceRecord()
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$table'' | ''(untyped)'' | //required// | //none// | +|  ''$table'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$params'' | ''(untyped)'' | //required// | //none// | +|  ''$params'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$to'' | ''(untyped)'' | //required// | //none// |+|  ''$to'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 321: Line 326:
 deletion during GDPR erasure). Rolls back and rethrows on any Throwable. deletion during GDPR erasure). Rolls back and rethrows on any Throwable.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$work'' | ''callable'' | //required// | The work to run inside the transaction |+|  ''$work'' |  ''callable'' |  //required// |  The work to run inside the transaction |
  
 **Returns:** ''(none declared)'' — mixed The callable's return value **Returns:** ''(none declared)'' — mixed The callable's return value
Line 369: Line 374:
 Filter and sanitize input values Filter and sanitize input values
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$sanitize'' | [[scriptlog:lib:core:sanitize&#124;''Sanitize'']] | //required// | Sanitizer instance | +|  ''$sanitize'' |  [[scriptlog:lib:core:sanitize|''Sanitize'']] |  //required// |  Sanitizer instance | 
-  | ''$str'' | ''(untyped)'' | //required// | Input value to filter | +|  ''$str'' |  ''(untyped)'' |  //required// |  Input value to filter | 
-  | ''$type'' | ''(untyped)'' | //required// | Sanitization type ('sql' or 'xss') |+|  ''$type'' |  ''(untyped)'' |  //required// |  Sanitization type ('sql' or 'xss') |
  
 **Returns:** ''(none declared)'' — int&#124;string Sanitized value as integer (sql) or string (xss) **Returns:** ''(none declared)'' — int&#124;string Sanitized value as integer (sql) or string (xss)
scriptlog/lib/core/dao.1790413761.txt.gz · Last modified: by admin