Skip to content

Commit bf879a6

Browse files
committed
V1.1.0
1 parent df7c2d2 commit bf879a6

File tree

8 files changed

+30
-24
lines changed

8 files changed

+30
-24
lines changed

SuperSQL/lib/connector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class SQLResponse implements \ArrayAccess, \Iterator
3232
public $error = false;
3333
public $outTypes;
3434
public $complete = true;
35+
public $stmt;
3536
/**
3637
* Gets data from a query
3738
*/

SuperSQL/lib/parser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ static function SELECT($table, $columns, $where, $join, $limit)
489489
}
490490
if (isset($limit['ORDER'])) {
491491
$sql .= ' ORDER BY ' . self::quote($limit['ORDER']);
492+
} else if (isset($limit['!ORDER'])) {
493+
$sql .= ' ORDER BY ' . self::quote($limit['ORDER']) . ' DESC';
492494
}
493495
if (isset($limit['LIMIT'])) {
494496
$sql .= ' LIMIT ' . (int) $limit['LIMIT'];

dist/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,37 @@
77

88
### Sizes
99

10-
* `SuperSQL.php` - 28250 Chars (28.3 MB)
11-
* `SuperSQL_min.php` - 12501 Chars (12.5 MB)
10+
* `SuperSQL.php` - 28413 Chars (28.4 MB)
11+
* `SuperSQL_min.php` - 12593 Chars (12.6 MB)
1212
* `SuperSQL_helper.php` - 11234 Chars (11.2 MB)
1313
* `SuperSQL_helper_min.php` - 5558 Chars (5.6 MB)
14-
* `SuperSQL_complete_min.php` - 17779 Chars (17.8 MB)
14+
* `SuperSQL_complete_min.php` - 17871 Chars (17.9 MB)
1515

1616
## Hashes
1717

1818
```
19-
* SuperSQL.php - 6b8a0ca5b29cc2941e243eedfaaf6a43
20-
* SuperSQL_min.php - f8e4fa363345276e1a908322ef10b969
21-
* SuperSQL_helper.php - e89949fcc3b648c678b4ff55c14ec4c0
22-
* SuperSQL_helper_min.php - 8376bf405228152b1b37a5e659ab3287
23-
* SuperSQL_complete.php - c50b9ae64111ba60684ac7e98b7d686e
19+
* SuperSQL.php - 384e2b0983336f63f344920ecb9af69f
20+
* SuperSQL_min.php - 364fe31e0f443b1d4dd0db066e4d1bce
21+
* SuperSQL_helper.php - a51136f4d7f18f300d7aa580b671bb46
22+
* SuperSQL_helper_min.php - 932d6c473e9ab4c87c17319ed2723192
23+
* SuperSQL_complete.php - 749d3090a380be2552dd7818bc301148
2424
```
2525

2626
## Performance
2727

2828
Profiled on PHP v7.1.4, 30 loops
2929

3030

31-
0.0393ms Average Time, Sum: 1.1784ms
31+
0.0175ms Average Time, Sum: 0.5255ms
3232

3333
### Specifics
3434

3535
| Name | Avg | Sum |
3636
|-------------------------|--------|--------|
37-
| 1 Row Insert | 0.0026 | 0.079 |
38-
| 100 R Insert W Temp | 0.029 | 0.8703 |
39-
| Select * | 0.001 | 0.0301 |
40-
| Select * W Cast | 0.0011 | 0.0324 |
41-
| Select * W Cast W where | 0.0011 | 0.0342 |
42-
| 1 Row Update | 0.0023 | 0.07 |
43-
| Delete | 0.0019 | 0.058 |
37+
| 1 Row Insert | 0.0009 | 0.0285 |
38+
| 100 R Insert W Temp | 0.0132 | 0.3957 |
39+
| Select * | 0.0005 | 0.0139 |
40+
| Select * W Cast | 0.0004 | 0.0132 |
41+
| Select * W Cast W where | 0.0005 | 0.0144 |
42+
| 1 Row Update | 0.0011 | 0.0323 |
43+
| Delete | 0.0009 | 0.0256 |

dist/SuperSQL.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
License: MIT (https://github.com/ThreeLetters/SuperSQL/blob/master/LICENSE)
55
Source: https://github.com/ThreeLetters/SQL-Library
66
Build: v1.1.5
7-
Built on: 04/10/2017
7+
Built on: 06/12/2017
88
*/
99

1010
namespace SuperSQL;
@@ -18,6 +18,7 @@ class SQLResponse implements \ArrayAccess, \Iterator
1818
public $error = false;
1919
public $outTypes;
2020
public $complete = true;
21+
public $stmt;
2122
function __construct($data, $error, $outtypes, $mode)
2223
{
2324
if (!$error) {
@@ -633,6 +634,8 @@ static function SELECT($table, $columns, $where, $join, $limit)
633634
}
634635
if (isset($limit['ORDER'])) {
635636
$sql .= ' ORDER BY ' . self::quote($limit['ORDER']);
637+
} else if (isset($limit['!ORDER'])) {
638+
$sql .= ' ORDER BY ' . self::quote($limit['ORDER']) . ' DESC';
636639
}
637640
if (isset($limit['LIMIT'])) {
638641
$sql .= ' LIMIT ' . (int) $limit['LIMIT'];

dist/SuperSQL_complete.php

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

dist/SuperSQL_helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
License: MIT (https://github.com/ThreeLetters/SuperSQL/blob/master/LICENSE)
55
Source: https://github.com/ThreeLetters/SQL-Library
66
Build: v1.1.5
7-
Built on: 04/10/2017
7+
Built on: 06/12/2017
88
*/
99

1010
namespace SuperSQL;

dist/SuperSQL_helper_min.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
License: MIT (https://github.com/ThreeLetters/SuperSQL/blob/master/LICENSE)
55
Source: https://github.com/ThreeLetters/SQL-Library
66
Build: v1.1.5
7-
Built on: 04/10/2017
7+
Built on: 06/12/2017
88
*/
99

1010
namespace SuperSQL;

dist/SuperSQL_min.php

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)