MCPcopy Create free account
hub / github.com/duckdb/duckdb / OpenFile

Method OpenFile

test/sqlite/sqllogic_parser.cpp:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace duckdb {
7
8bool SQLLogicParser::OpenFile(const string &path) {
9 this->file_name = path;
10
11 std::ifstream infile(file_name);
12 if (infile.bad() || infile.fail()) {
13 return false;
14 }
15
16 string line;
17 while (std::getline(infile, line)) {
18 lines.push_back(StringUtil::Replace(line, "\r", ""));
19 }
20 return !infile.bad();
21}
22
23bool SQLLogicParser::EmptyOrComment(const string &line) {
24 return line.empty() || StringUtil::StartsWith(line, "#");

Callers 12

GetWALFileSizeFunction · 0.45
TruncateWALFunction · 0.45
FlipWALByteFunction · 0.45
test_checksum.cppFile · 0.45
TestFileGuardMethod · 0.45
WriteContentMethod · 0.45
ExecuteFileMethod · 0.45
ExecuteInternalMethod · 0.45

Calls 1

push_backMethod · 0.45

Tested by 3

TestFileGuardMethod · 0.36
WriteContentMethod · 0.36
ExecuteFileMethod · 0.36