sqlthon 0.0.4__tar.gz → 0.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlthon
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: A simple package for SQLite3 operations
5
5
  Author-email: SAUMS <mohamnown@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sqlthon"
7
- version = '0.0.4'
7
+ version = '0.0.6'
8
8
  description = "A simple package for SQLite3 operations"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -0,0 +1,11 @@
1
+ """
2
+ Sqlthon - A Simple Package For SQLite3 Operations.
3
+ """
4
+
5
+ from .core import Connect, Field
6
+
7
+ __all__ = ['Connect', 'Field']
8
+ __version__ = '0.0.6'
9
+ __author__ = "SAUMS"
10
+ __email__ = "saums1391@gmail.com"
11
+ __description__ = "Operate With SQLite3 Buy Simple"
@@ -0,0 +1,50 @@
1
+ STR = "TEXT"
2
+ INT = "INTEGER"
3
+ FLOAT = "REAL"
4
+ BOOL = "BOOLEAN"
5
+ BLOB = "BLOB"
6
+
7
+
8
+
9
+ UNIQUE = "UNIQUE"
10
+ NOT_NULL = "NOT NULL"
11
+ PRIMARY_KEY = "PRIMARY KEY"
12
+ AUTO_INCREMENT = "AUTOINCREMENT"
13
+
14
+
15
+
16
+ def DEFAULT(value):
17
+ if isinstance(value, str):
18
+ return f"DEFAULT '{value}'"
19
+ elif value is None:
20
+ return "DEFAULT NULL"
21
+ else:
22
+ return f"DEFAULT {value}"
23
+
24
+ def CHECK(condition):
25
+ return f"CHECK ({condition})"
26
+
27
+ def FOREIGN_KEY(table, column="id"):
28
+ return f"REFERENCES {table}({column})"
29
+
30
+ CURRENT_TIMESTAMP = "CURRENT_TIMESTAMP"
31
+
32
+ def DEFAULT_NOW():
33
+ return f"DEFAULT {CURRENT_TIMESTAMP}"
34
+
35
+
36
+
37
+ def COUNT(query="*"):
38
+ return f"COUNT({query})"
39
+
40
+ def SUM(query):
41
+ return f"SUM({query})"
42
+
43
+ def AVG(query):
44
+ return f"AVG({query})"
45
+
46
+ def MIN(query):
47
+ return f"MIN({query})"
48
+
49
+ def MAX(query):
50
+ return f"MAX({query})"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlthon
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: A simple package for SQLite3 operations
5
5
  Author-email: SAUMS <mohamnown@gmail.com>
6
6
  License: MIT
@@ -2,6 +2,7 @@ README.md
2
2
  pyproject.toml
3
3
  src/sqlthon/__init__.py
4
4
  src/sqlthon/core.py
5
+ src/sqlthon/keywords.py
5
6
  src/sqlthon.egg-info/PKG-INFO
6
7
  src/sqlthon.egg-info/SOURCES.txt
7
8
  src/sqlthon.egg-info/dependency_links.txt
@@ -1,11 +0,0 @@
1
- """
2
- Sqlthon - A Simple Package For SQLite3 Operations.
3
- """
4
-
5
- from .core import Connect
6
-
7
- __all__ = ['Connect']
8
- __version__ = '0.0.4'
9
- __author__ = "SAUMS"
10
- __email__ = "saums1391@gmail.com"
11
- __description__ = "Operate With SQLite3 Buy Simple"
File without changes
File without changes
File without changes