BASE . LOG, 'log_file_id' => $LOG_FILE_ID, 'log_per_date' => true, ]); // db connection and attach logger $db = new CoreLibs\DB\IO(DB_CONFIG, $log); $db->log->debug('START', '=============================>'); $PAGE_NAME = 'TEST CLASS: DB SINGLE'; print ""; print "" . $PAGE_NAME . ""; print ""; print '
Class Test Master
'; print '

' . $PAGE_NAME . '

'; print "LOGFILE NAME: " . $db->log->getLogFile() . "
"; print "LOGFILE ID: " . $db->log->getLogFileId() . "
"; print "DBINFO: " . $db->dbInfo() . "
"; // DB client encoding print "DB client encoding: " . $db->dbGetEncoding() . "
"; print "DB search path: " . $db->dbGetSchema() . "
"; $to_db_version = '15.2'; print "VERSION DB: " . $db->dbVersion() . "
"; print "SERVER ENCODING: " . $db->dbVersionInfo('server_encoding') . "
"; if (($dbh = $db->dbGetDbh()) instanceof \PgSql\Connection) { print "ALL OUTPUT [TEST]:
" . print_r(pg_version($dbh), true) . "

"; } else { print "NO DB HANDLER
"; } $uniqid = \CoreLibs\Create\Uids::uniqIdShort(); $binary_data = $db->dbEscapeBytea(file_get_contents('class_test.db.php') ?: ''); $query_params = [ $uniqid, true, 'STRING A', 2, 2.5, 1, date('H:m:s'), date('Y-m-d H:m:s'), json_encode(['a' => 'string', 'b' => 1, 'c' => 1.5, 'f' => true, 'g' => ['a', 1, 1.5]]), null, '{"a", "b"}', '{1,2}', '{"(array Text A, 5, 8.8)","(array Text B, 10, 15.2)"}', '("Text", 4, 6.3)', $binary_data ]; $query_insert = <<dbExecParams($query_insert, $query_params); $query_select = <<dbReturnRowParams($query_select, [$uniqid]); if (is_array($res)) { var_dump($res); } print ""; // __END__