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

Method saveCommand

src/isql/InputDevices.cpp:246–264  ·  view source on GitHub ↗

Save SQL command (not isql's own commands) to a history file only if we are in interactive mode.

Source from the content-addressed store, hash-verified

244// Save SQL command (not isql's own commands) to a history file only if we
245// are in interactive mode.
246void InputDevices::saveCommand(const char* statement, const char* term)
247{
248 if (m_ifp.indev_fpointer == stdin)
249 {
250 FILE* f = m_ofp.indev_fpointer;
251 if (f)
252 {
253 fputs(statement, f);
254 fputs(term, f);
255 // Add newline to make the file more readable.
256 fputc('\n', f);
257 }
258 else
259 {
260 Command* command = FB_NEW Command(statement, term);
261 commands.add(command);
262 }
263 }
264}
265
266// Are we reading from stdin now or from a file?
267bool InputDevices::readingStdin() const

Callers

nothing calls this directly

Calls 3

fputsFunction · 0.85
CommandClass · 0.70
addMethod · 0.45

Tested by

no test coverage detected