Skip to content

Commit a4b6177

Browse files
v0.7.5
1 parent 32c0b35 commit a4b6177

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img src="https://static.wikia.nocookie.net/arnelify/images/c/c8/Arnelify-logo-2024.png/revision/latest?cb=20240701012515" style="width:336px;" alt="Arnelify Logo" />
22

3-
![Arnelify ORM for NodeJS](https://img.shields.io/badge/Arnelify%20ORM%20for%20NodeJS-0.7.4-yellow) ![C++](https://img.shields.io/badge/C++-2b-red) ![G++](https://img.shields.io/badge/G++-14.2.0-blue) ![NodeJS](https://img.shields.io/badge/NodeJS-22.13.1-green) ![Bun](https://img.shields.io/badge/Bun-1.2.0-green)
3+
![Arnelify ORM for NodeJS](https://img.shields.io/badge/Arnelify%20ORM%20for%20NodeJS-0.7.5-yellow) ![C++](https://img.shields.io/badge/C++-2b-red) ![G++](https://img.shields.io/badge/G++-14.2.0-blue) ![NodeJS](https://img.shields.io/badge/NodeJS-22.13.1-green) ![Bun](https://img.shields.io/badge/Bun-1.2.0-green)
44

55
## 🚀 About
66
**Arnelify® ORM for NodeJS** - is a minimalistic NodeJS (Bun) Addon which is an ORM written in C and C++.
@@ -53,7 +53,7 @@ This software is licensed under the <a href="https://github.com/arnelify/arnelif
5353
Join us to help improve this software, fix bugs or implement new functionality. Active participation will help keep the software up-to-date, reliable, and aligned with the needs of its users.
5454

5555
## ⭐ Release Notes
56-
Version 0.7.4 - NodeJS (Bun) Addon
56+
Version 0.7.5 - NodeJS (Bun) Addon
5757

5858
We are excited to introduce the Arnelify ORM for NodeJS (Bun) addon! Please note that this version is raw and still in active development.
5959

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arnelify-orm",
3-
"version": "0.7.4",
3+
"version": "0.7.5",
44
"description": "Minimalistic NodeJS (Bun) addon which is an ORM written in C and C++.",
55
"keywords": [
66
"arnelify",

src/mysql/query/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,13 @@ class MySQLQuery {
9999
* @returns
100100
*/
101101
#hasCondition() {
102+
const isNull: boolean = this.#query.endsWith('IS NULL');
103+
if (isNull) return true;
104+
102105
const tokens: string[] = this.#query.split(' ');
103106
if (tokens.length < 3) return false;
104107

105108
const op: string = tokens[tokens.length - 2];
106-
const rhs: string = tokens[tokens.length - 1];
107-
if (rhs === 'IS NULL') return true;
108109
return this.#isOperator(op);
109110
}
110111

src/src/mysql/query/index.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ class MySQLQuery {
143143
}
144144

145145
const bool hasCondition() {
146+
const bool isNull = this->query.ends_with("IS NULL");
147+
if (isNull) return true;
148+
146149
std::vector<std::string> tokens;
147150
std::istringstream stream(this->query);
148151
std::string token;
@@ -152,10 +155,7 @@ class MySQLQuery {
152155

153156
if (tokens.size() < 3) return false;
154157

155-
const std::string& lhs = tokens[tokens.size() - 3];
156158
const std::string& op = tokens[tokens.size() - 2];
157-
const std::string& rhs = tokens[tokens.size() - 1];
158-
159159
return isOperator(op);
160160
}
161161

0 commit comments

Comments
 (0)