MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / getColumnNamesToCopy

Function getColumnNamesToCopy

src/binder/bind/bind_import_database.cpp:41–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41static std::string getColumnNamesToCopy(const CopyFrom& copyFrom) {
42 std::string columns = "";
43 std::string delimiter = "";
44 for (auto& column : copyFrom.getCopyColumnInfo().columnNames) {
45 columns += delimiter;
46 columns += "`" + column + "`";
47 if (delimiter == "") {
48 delimiter = ",";
49 }
50 }
51 if (columns.empty()) {
52 return columns;
53 }
54 return std::format("({})", columns);
55}
56
57static std::string getCopyFilePath(const std::string& boundFilePath, const std::string& filePath) {
58 if (filePath[0] == '/' || (std::isalpha(filePath[0]) && filePath[1] == ':')) {

Callers 1

Calls 2

getCopyColumnInfoMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected