def utf8_bind_fctfinder(stmt, parno, data): """ Fctfinder for _SqliteStatement3 with support for utf8 strings """ if type(data) is str: return bind_mbcsutftext if type(data) is unicode: return bind_utftext return sqlite.def_bind_fctfinder(stmt, parno, data)
def utf8_bind_fctfinder(stmt, parno, data): """ Fctfinder for _SqliteStatement3 with support for utf8 strings """ if type(data) is str: return bind_mbcsutftext if type(data) is str: return bind_utftext return sqlite.def_bind_fctfinder(stmt, parno, data)
# method # """ # nakedword = utf8Dec(values[0].value_blob(), "replace")[0] # fileContents = utf8Dec(values[1].value_blob(), "replace")[0] # sarOp = sqlite.getTransObject(values[2].value_int()) # if sarOp.testWikiPage(nakedword, fileContents) == True: # context.result_int(1) # else: # context.result_null() # Get the default text handling functions bind_text = sqlite.def_bind_fctfinder(None, None, "") column_text = sqlite.AUTO_COLUMN_CONVERTS[sqlite.SQLITE_TEXT] def column_utftext(stmt, col): return utf8Dec(column_text(stmt, col), "replace")[0] def bind_mbcsutftext(stmt, parno, data): bind_text(stmt, parno, mbcsToUtf8(data)) def bind_utftext(stmt, parno, unicodedata): bind_text(stmt, parno, utf8Enc(unicodedata)[0])
# def sqlite_testMatch(context, values): # """ # Sqlite user-defined function "testMatch" for WikiData.search() # method # """ # nakedword = utf8Dec(values[0].value_blob(), "replace")[0] # fileContents = utf8Dec(values[1].value_blob(), "replace")[0] # sarOp = sqlite.getTransObject(values[2].value_int()) # if sarOp.testWikiPage(nakedword, fileContents) == True: # context.result_int(1) # else: # context.result_null() # Get the default text handling functions bind_text = sqlite.def_bind_fctfinder(None, None, "") column_text = sqlite.AUTO_COLUMN_CONVERTS[sqlite.SQLITE_TEXT] column_utftext = column_text def bind_mbcsutftext(stmt, parno, data): bind_text(stmt, parno, mbcsToUtf8(data)) def bind_utftext(stmt, parno, unicodedata): bind_text(stmt, parno, utf8Enc(unicodedata)[0]) def utf8_bind_fctfinder(stmt, parno, data): """