| 195 | } |
| 196 | |
| 197 | int32_t GetSqlTypeFromTypeName(const char* sqlite_type) { |
| 198 | if (sqlite_type == NULLPTR) { |
| 199 | // SQLite may not know the column type yet. |
| 200 | return SQLITE_NULL; |
| 201 | } |
| 202 | |
| 203 | if (arrow::internal::AsciiEqualsCaseInsensitive(sqlite_type, "int") || |
| 204 | arrow::internal::AsciiEqualsCaseInsensitive(sqlite_type, "integer")) { |
| 205 | return SQLITE_INTEGER; |
| 206 | } else if (arrow::internal::AsciiEqualsCaseInsensitive(sqlite_type, "REAL")) { |
| 207 | return SQLITE_FLOAT; |
| 208 | } else if (arrow::internal::AsciiEqualsCaseInsensitive(sqlite_type, "BLOB")) { |
| 209 | return SQLITE_BLOB; |
| 210 | } else if (arrow::internal::AsciiEqualsCaseInsensitive(sqlite_type, "TEXT") || |
| 211 | arrow::internal::AsciiEqualsCaseInsensitive(sqlite_type, "DATE") || |
| 212 | AsciiStartsWithCaseInsensitive(sqlite_type, "char") || |
| 213 | AsciiStartsWithCaseInsensitive(sqlite_type, "varchar")) { |
| 214 | return SQLITE_TEXT; |
| 215 | } else { |
| 216 | return SQLITE_NULL; |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | class SQLiteFlightSqlServer::Impl { |
| 221 | private: |
no test coverage detected