MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / getRecords

Method getRecords

src/jrd/KeywordsTable.cpp:32–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31
32RecordBuffer* KeywordsTable::getRecords(thread_db* tdbb, jrd_rel* relation)
33{
34 fb_assert(relation);
35 fb_assert(relation->rel_id == rel_keywords);
36
37 auto recordBuffer = getData(relation);
38 if (recordBuffer)
39 return recordBuffer;
40
41 recordBuffer = allocBuffer(tdbb, *tdbb->getDefaultPool(), relation->rel_id);
42
43 const auto record = recordBuffer->getTempRecord();
44
45 for (const auto& token : tdbb->getDatabase()->dbb_keywords())
46 {
47 const auto& tokenString = token.first;
48
49 if (isalpha(tokenString[0]))
50 {
51 record->nullify();
52
53 putField(tdbb, record,
54 DumpField(f_keyword_name, VALUE_STRING, tokenString.length(), tokenString.c_str()));
55
56 const bool reserved = !token.second.nonReserved;
57 putField(tdbb, record, DumpField(f_keyword_reserved, VALUE_BOOLEAN, 1, &reserved));
58
59 recordBuffer->store(record);
60 }
61 }
62
63 return recordBuffer;
64}
65
66
67//--------------------------------------

Callers

nothing calls this directly

Calls 10

DumpFieldClass · 0.85
KeywordsTableClass · 0.85
getTempRecordMethod · 0.80
getDatabaseMethod · 0.80
nullifyMethod · 0.80
getDefaultPoolMethod · 0.45
lengthMethod · 0.45
c_strMethod · 0.45
storeMethod · 0.45
getRequestMethod · 0.45

Tested by

no test coverage detected