File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55</p >
66
77
8- ** TODO**
9- <!-- 
10- [](https://codecov.io/github/sqlitecloud/python)
11- 
12- 
13-  -->
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();
Original file line number Diff line number Diff line change 11<?php
22
3- use SQLiteCloud ;
3+ require_once __DIR__ . '/../bootstrap.php ' ;
4+
5+ use SQLiteCloud \SQLiteCloudClient ;
46
57ini_set ('display_startup_errors ' , 1 );
68ini_set ('display_errors ' , 1 );
1416function 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 ' )) {
Original file line number Diff line number Diff line change 11<?php
22
3+ use SQLiteCloud \SQLiteCloudRowset ;
4+
35include_once ('auth.php ' );
46include_once ('common.php ' );
57
1113$ rc = exec_sql ($ database , $ sql );
1214
1315if ($ 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
2527echo json_encode ($ r );
You can’t perform that action at this time.
0 commit comments