Changeset View
Changeset View
Standalone View
Standalone View
src/expression/KDbFunctionExpression.cpp
Show First 20 Lines • Show All 700 Lines • ▼ Show 20 Line(s) | 425 | #define _SIG0 \ | |||
---|---|---|---|---|---|
701 | 701 | | |||
702 | insert(QLatin1String("SOUNDEX"), decl = new BuiltInFunctionDeclaration); | 702 | insert(QLatin1String("SOUNDEX"), decl = new BuiltInFunctionDeclaration); | ||
703 | // From https://www.sqlite.org/lang_corefunc.html | 703 | // From https://www.sqlite.org/lang_corefunc.html | ||
704 | /* The soundex(X) function returns a string that is the soundex encoding of the string | 704 | /* The soundex(X) function returns a string that is the soundex encoding of the string | ||
705 | X. The string "?000" is returned if the argument is NULL or contains non-ASCII | 705 | X. The string "?000" is returned if the argument is NULL or contains non-ASCII | ||
706 | alphabetic characters. */ | 706 | alphabetic characters. */ | ||
707 | // See also https://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_soundex | 707 | // See also https://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_soundex | ||
708 | // See also http://www.postgresql.org/docs/9.5/static/fuzzystrmatch.html#AEN165853 | 708 | // See also http://www.postgresql.org/docs/9.5/static/fuzzystrmatch.html#AEN165853 | ||
709 | //! @todo we call drv_executeVoidSQL("CREATE EXTENSION IF NOT EXISTS fuzzystrmatch") on connection, | 709 | //! @todo we call drv_executeSql("CREATE EXTENSION IF NOT EXISTS fuzzystrmatch") on connection, | ||
710 | //! do that on first use of SOUNDEX() | 710 | //! do that on first use of SOUNDEX() | ||
711 | // example: SELECT SOUNDEX("John") | 711 | // example: SELECT SOUNDEX("John") | ||
712 | // result: "J500" | 712 | // result: "J500" | ||
713 | decl->defaultReturnType = KDbField::Text; | 713 | decl->defaultReturnType = KDbField::Text; | ||
714 | _SIG(soundex, argAnyTextOrNull); | 714 | _SIG(soundex, argAnyTextOrNull); | ||
715 | 715 | | |||
716 | insert(QLatin1String("SUBSTR"), decl = new BuiltInFunctionDeclaration); | 716 | insert(QLatin1String("SUBSTR"), decl = new BuiltInFunctionDeclaration); | ||
717 | // From https://www.sqlite.org/lang_corefunc.html | 717 | // From https://www.sqlite.org/lang_corefunc.html | ||
▲ Show 20 Lines • Show All 695 Lines • Show Last 20 Lines |