| 68 | } |
| 69 | |
| 70 | ColumnMetadata GetColumnMetadata(int column_type, const char* table) { |
| 71 | ColumnMetadata::ColumnMetadataBuilder builder = ColumnMetadata::Builder(); |
| 72 | |
| 73 | builder.Scale(15).IsAutoIncrement(false).IsReadOnly(false); |
| 74 | if (table == NULLPTR) { |
| 75 | return builder.Build(); |
| 76 | } else if (column_type == SQLITE_TEXT || column_type == SQLITE_BLOB) { |
| 77 | std::string table_name(table); |
| 78 | builder.TableName(table_name); |
| 79 | } else { |
| 80 | std::string table_name(table); |
| 81 | builder.TableName(table_name).Precision(GetPrecisionFromColumn(column_type)); |
| 82 | } |
| 83 | return builder.Build(); |
| 84 | } |
| 85 | |
| 86 | arrow::Result<std::shared_ptr<SqliteStatement>> SqliteStatement::Create( |
| 87 | sqlite3* db, const std::string& sql) { |