myTinySQL v0.2.0-2-g5000098
A tiny SQL interpreter over fixed-width text files
Loading...
Searching...
No Matches
Functions
tinysql::anonymous_namespace{TableFile.cpp} Namespace Reference

Functions

void checkFits (const Column &column, const std::string &value)
 Checks that a value fits in its column.
 
void place (std::string &record, const Column &column, const std::string &value)
 Writes a value into its column's characters of a row, padded with spaces to the column width.
 

Function Documentation

◆ checkFits()

void tinysql::anonymous_namespace{TableFile.cpp}::checkFits ( const Column &  column,
const std::string &  value 
)

Checks that a value fits in its column.

Parameters
columnThe column.
valueThe value to store.
Exceptions
SqlErrorIf the value is longer than the column width.

Definition at line 20 of file TableFile.cpp.

◆ place()

void tinysql::anonymous_namespace{TableFile.cpp}::place ( std::string &  record,
const Column &  column,
const std::string &  value 
)

Writes a value into its column's characters of a row, padded with spaces to the column width.

Parameters
recordThe row being built or edited; it must be at least as long as the row length.
columnWhere the value goes.
valueThe value.
Exceptions
SqlErrorIf the value is longer than the column width.

Definition at line 33 of file TableFile.cpp.