summaryrefslogtreecommitdiff
path: root/perf/perf-sqlite3.inc.php
blob: 19198d5b3080b3000e671e1a61ed4b61a2c13919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php

// security - hide paths
if (!defined('ADODB_DIR')) die();

class perf_sqlite3 extends adodb_perf{

	var $tablesSQL = "SELECT * FROM sqlite_master WHERE type='table'";

	var $createTableSQL = "CREATE TABLE adodb_logsql (
		created datetime NOT NULL,
		sql0 varchar(250) NOT NULL,
		sql1 text NOT NULL,
		params text NOT NULL,
		tracer text NOT NULL,
		timer decimal(16,6) NOT NULL
		)";

	var $settings = array();

	function __construct(&$conn)
	{
		$this->conn = $conn;
	}

	function tables($orderby='1')
	{
		if (!$this->tablesSQL){
			return false;
		}

		$rs = $this->conn->execute($this->tablesSQL);
		if (!$rs) {
			return false;
		}

		$html = rs2html($rs, false, false, false, false);
		return $html;
	}
}