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