Added replace_null
This commit is contained in:
parent
818feac63f
commit
25a06cde64
@ -1,5 +1,11 @@
|
|||||||
import sqlite3 as sql
|
import sqlite3 as sql
|
||||||
"""Various utilities"""
|
"""Various utilities"""
|
||||||
|
|
||||||
|
def replace_null(s):
|
||||||
|
if not s:
|
||||||
|
return "None"
|
||||||
|
return s
|
||||||
|
|
||||||
def sanitize(s):
|
def sanitize(s):
|
||||||
if type(s) != str: return s
|
if type(s) != str: return s
|
||||||
return s.replace("'", r"''").strip(" ")
|
return s.replace("'", r"''").strip(" ")
|
||||||
|
Loading…
Reference in New Issue
Block a user