Skip to content

Commit 91a45fc

Browse files
v0.7.5
1 parent a1063a4 commit 91a45fc

4 files changed

Lines changed: 10 additions & 10 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 Python](https://img.shields.io/badge/Arnelify%20ORM%20for%20Python-0.7.4-yellow) ![C++](https://img.shields.io/badge/C++-2b-red) ![G++](https://img.shields.io/badge/G++-14.2.0-blue) ![Python](https://img.shields.io/badge/Python-3.11.2-blue) ![Nuitka](https://img.shields.io/badge/Nuitka-2.6.4-blue)
3+
![Arnelify ORM for Python](https://img.shields.io/badge/Arnelify%20ORM%20for%20Python-0.7.5-yellow) ![C++](https://img.shields.io/badge/C++-2b-red) ![G++](https://img.shields.io/badge/G++-14.2.0-blue) ![Python](https://img.shields.io/badge/Python-3.11.2-blue) ![Nuitka](https://img.shields.io/badge/Nuitka-2.6.4-blue)
44

55
## 🚀 About
66
**Arnelify® ORM for Python** - is a minimalistic dynamic library which is an ORM written in C and C++.
@@ -55,7 +55,7 @@ This software is licensed under the <a href="https://github.com/arnelify/arnelif
5555
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.
5656

5757
## ⭐ Release Notes
58-
Version 0.7.4 - Minimalistic dynamic library
58+
Version 0.7.5 - Minimalistic dynamic library
5959

6060
We are excited to introduce the Arnelify ORM dynamic library for Python! Please note that this version is raw and still in active development.
6161

arnelify_orm/mysql/query/index.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ def hasGroupCondition(self) -> bool:
7777
return self.query.endswith(")")
7878

7979
def hasCondition(self) -> bool:
80+
isNull: bool = self.query.endswith('IS NULL')
81+
if isNull:
82+
return True
83+
8084
tokens = self.query.split()
8185

8286
if len(tokens) < 3:
8387
return False
8488

8589
op = tokens[-2]
86-
rhs = tokens[-1]
87-
if rhs == 'IS NULL':
88-
return True
89-
9090
return self.isOperator(op)
9191

9292
def alterTable(self, tableName: str, condition: callable) -> None:

arnelify_orm/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

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
setup(
1313
name="arnelify_orm",
14-
version="0.7.4",
14+
version="0.7.5",
1515
author="Arnelify",
1616
description="Minimalistic dynamic library which is an ORM written in C and C++.",
1717
url='https://github.com/arnelify/arnelify-orm-python',

0 commit comments

Comments
 (0)