| 64 | } |
| 65 | |
| 66 | static void upperFunction(sqlite3_context* context, int /*argc*/, sqlite3_value** argv) |
| 67 | { |
| 68 | int len = sqlite3_value_bytes16(argv[0]); |
| 69 | const void* data = sqlite3_value_text16(argv[0]); |
| 70 | |
| 71 | if (!data) return; |
| 72 | |
| 73 | QString string = QString::fromRawData(reinterpret_cast<const QChar*>(data), len/sizeof(QChar)); |
| 74 | string = string.toUpper(); |
| 75 | |
| 76 | sqlite3_result_text16(context, string.data(), -1, SQLITE_TRANSIENT); |
| 77 | } |
| 78 | |
| 79 | void installSQLiteExtension( sqlite3* db ) |
| 80 | { |