Skip to content

Commit 6027cb5

Browse files
committed
fix(admin): imports
1 parent dd43f38 commit 6027cb5

3 files changed

Lines changed: 16 additions & 14 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
</p>
66

77

8-
**TODO**
9-
<!-- ![Build Status](https://github.com/sqlitecloud/sqlitecloud-py/actions/workflows/deploy.yaml/badge.svg "Build Status")
10-
[![codecov](https://codecov.io/github/sqlitecloud/python/graph/badge.svg?token=38G6FGOWKP)](https://codecov.io/github/sqlitecloud/python)
11-
![PyPI - Version](https://img.shields.io/pypi/v/sqlitecloud?link=https%3A%2F%2Fpypi.org%2Fproject%2FSqliteCloud%2F)
12-
![PyPI - Downloads](https://img.shields.io/pypi/dm/sqlitecloud?link=https%3A%2F%2Fpypi.org%2Fproject%2FSqliteCloud%2F)
13-
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sqlitecloud?link=https%3A%2F%2Fpypi.org%2Fproject%2FSqliteCloud%2F) -->
8+
[![Test and QA](https://github.com/sqlitecloud/sqlitecloud-php/actions/workflows/deploy.yaml/badge.svg?branch=main)](https://github.com/sqlitecloud/sqlitecloud-php/actions/workflows/deploy.yaml)
9+
[![codecov](https://codecov.io/gh/sqlitecloud/sqlitecloud-php/graph/badge.svg?token=3FFHULGCOY)](https://codecov.io/gh/sqlitecloud/sqlitecloud-php)
10+
![PHP](https://img.shields.io/packagist/dependency-v/sqlitecloud/sqlitecloud/php)
1411

1512

1613
- [Driver for SQLite Cloud](#driver-for-sqlite-cloud)
@@ -32,7 +29,8 @@ $ composer install sqlitecloud/sqlitecloud
3229
```
3330

3431
```php
35-
use SQLiteCloud;
32+
use use SQLiteCloud\SQLiteCloudClient;
33+
use SQLiteCloud\SQLiteCloudRowset;
3634

3735
# Open the connection to SQLite Cloud
3836
$sqlite = new SQLiteCloud();

‎admin/common.php‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
use SQLiteCloud;
3+
require_once __DIR__ . '/../bootstrap.php';
4+
5+
use SQLiteCloud\SQLiteCloudClient;
46

57
ini_set('display_startup_errors', 1);
68
ini_set('display_errors', 1);
@@ -14,7 +16,7 @@
1416
function do_real_connect($hostname, $port, $username, $password)
1517
{
1618
global $sqlitecloud;
17-
$sqlitecloud = new SQLiteCloud();
19+
$sqlitecloud = new SQLiteCloudClient();
1820
$sqlitecloud->username = $username;
1921
$sqlitecloud->password = $password;
2022
if (file_exists('assets/ca.pem')) {

‎admin/console_action.php‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use SQLiteCloud\SQLiteCloudRowset;
4+
35
include_once('auth.php');
46
include_once('common.php');
57

@@ -11,15 +13,15 @@
1113
$rc = exec_sql($database, $sql);
1214

1315
if ($rc === false) {
14-
$r = array('result' => 0, 'msg' => exec_lasterror(true));
16+
$r = ['result' => 0, 'msg' => exec_lasterror(true)];
1517
} elseif ($rc instanceof SQLiteCloudRowset) {
16-
$r = array('result' => 2, 'msg' => render_console_table($rc));
18+
$r = ['result' => 2, 'msg' => render_console_table($rc)];
1719
} elseif ($rc === true) {
18-
$r = array('result' => 1, 'msg' => 'Query succesfully executed.');
20+
$r = ['result' => 1, 'msg' => 'Query succesfully executed.'];
1921
} elseif ($rc === null) {
20-
$r = array('result' => 1, 'msg' => 'NULL');
22+
$r = ['result' => 1, 'msg' => 'NULL'];
2123
} else {
22-
$r = array('result' => 1, 'msg' => $rc);
24+
$r = ['result' => 1, 'msg' => $rc];
2325
}
2426

2527
echo json_encode($r);

0 commit comments

Comments
 (0)