Skip to content

Commit 984c152

Browse files
committed
finished insert and query functions
1 parent ad57d3c commit 984c152

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,22 @@ def is_number(string):
101101

102102
# Prevents set to null no nullable elements
103103
elif user_input == '' and required:
104-
print(f'\n[!] Error, {column[0]} is required.\n')
104+
print(f'\n(!) Error, {column[0]} is required.\n')
105105
continue
106106

107107
# Checks if item lenght is valid
108108
elif len(user_input) > column[2]:
109-
print(f'\n[!] Error, {column[0]} maximum lenght is {column[2]}.\n')
109+
print(f'\n(!) Error, {column[0]} maximum lenght is {column[2]}.\n')
110110
continue
111111

112112
# Checks if item is number
113113
elif datatype == 'NUMBER' and not is_number(user_input):
114-
print(f'\n[!] Error, {column[0]} has to be a number.\n')
114+
print(f'\n(!) Error, {column[0]} has to be a number.\n')
115115
continue
116116

117117
# Cheks if item is datetime
118118
elif datatype == 'DATETIME' and not is_date(user_input):
119-
print(f'\n[!] Error, not a valid date.\n')
119+
print(f'\n(!) Error, not a valid date.\n')
120120
continue
121121

122122
# If all ok...
@@ -157,7 +157,7 @@ def is_number(string):
157157
input('Press ENTER')
158158

159159
else:
160-
print(f'\n[!] Error, option {selected+1} doesn\'t exist')
160+
print(f'\n(!) Error, option {selected+1} doesn\'t exist')
161161
input('\nPress ENTER')
162162

163163

@@ -208,7 +208,7 @@ def show_queries(CURSOR):
208208
break
209209

210210
else:
211-
print(f'\n[!] Error, option {selected} doesn\'t exist')
211+
print(f'\n(!) Error, option {selected} doesn\'t exist')
212212
input('\nPress ENTER')
213213

214214
elif selected == 98:

0 commit comments

Comments
 (0)