MCPcopy Create free account
hub / github.com/apache/arrow / GetSqlInfoResultMap

Function GetSqlInfoResultMap

cpp/src/arrow/flight/sql/example/sqlite_sql_info.cc:30–225  ·  view source on GitHub ↗

\brief Gets the mapping from SQL info ids to SqlInfoResult instances. \return the cache.

Source from the content-addressed store, hash-verified

28/// \brief Gets the mapping from SQL info ids to SqlInfoResult instances.
29/// \return the cache.
30SqlInfoResultMap GetSqlInfoResultMap() {
31 return {
32 {SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_NAME,
33 SqlInfoResult(std::string("db_name"))},
34 {SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_VERSION,
35 SqlInfoResult(std::string("sqlite 3"))},
36 {SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_ARROW_VERSION,
37 SqlInfoResult(std::string(ARROW_VERSION_STRING))},
38 {SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_READ_ONLY, SqlInfoResult(false)},
39 {SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_SQL, SqlInfoResult(true)},
40 {SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_SUBSTRAIT, SqlInfoResult(false)},
41 {SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_TRANSACTION,
42 SqlInfoResult(SqlInfoOptions::SqlSupportedTransaction::
43 SQL_SUPPORTED_TRANSACTION_TRANSACTION)},
44 {SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_CANCEL, SqlInfoResult(false)},
45 {SqlInfoOptions::SqlInfo::SQL_DDL_CATALOG,
46 SqlInfoResult(false /* SQLite 3 does not support catalogs */)},
47 {SqlInfoOptions::SqlInfo::SQL_DDL_SCHEMA,
48 SqlInfoResult(false /* SQLite 3 does not support schemas */)},
49 {SqlInfoOptions::SqlInfo::SQL_DDL_TABLE, SqlInfoResult(true)},
50 {SqlInfoOptions::SqlInfo::SQL_IDENTIFIER_CASE,
51 SqlInfoResult(int64_t(SqlInfoOptions::SqlSupportedCaseSensitivity::
52 SQL_CASE_SENSITIVITY_CASE_INSENSITIVE))},
53 {SqlInfoOptions::SqlInfo::SQL_IDENTIFIER_QUOTE_CHAR,
54 SqlInfoResult(std::string("\""))},
55 {SqlInfoOptions::SqlInfo::SQL_QUOTED_IDENTIFIER_CASE,
56 SqlInfoResult(int64_t(SqlInfoOptions::SqlSupportedCaseSensitivity::
57 SQL_CASE_SENSITIVITY_CASE_INSENSITIVE))},
58 {SqlInfoOptions::SqlInfo::SQL_ALL_TABLES_ARE_SELECTABLE, SqlInfoResult(true)},
59 {SqlInfoOptions::SqlInfo::SQL_NULL_ORDERING,
60 SqlInfoResult(
61 int64_t(SqlInfoOptions::SqlNullOrdering::SQL_NULLS_SORTED_AT_START))},
62 {SqlInfoOptions::SqlInfo::SQL_KEYWORDS,
63 SqlInfoResult(std::vector<std::string>({"ABORT",
64 "ACTION",
65 "ADD",
66 "AFTER",
67 "ALL",
68 "ALTER",
69 "ALWAYS",
70 "ANALYZE",
71 "AND",
72 "AS",
73 "ASC",
74 "ATTACH",
75 "AUTOINCREMENT",
76 "BEFORE",
77 "BEGIN",
78 "BETWEEN",
79 "BY",
80 "CASCADE",
81 "CASE",
82 "CAST",
83 "CHECK",
84 "COLLATE",
85 "COLUMN",
86 "COMMIT",
87 "CONFLICT",

Callers 2

TEST_FFunction · 0.85
CreateMethod · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68