'field' directive line
More...
#include <parsev2.h>
|
class | Type |
| A smart enum for converting SQL type strings to one of a relatively few types we directly support. More...
|
|
|
| Field (const std::string &name, const std::string &type, bool is_unsigned=false, bool is_null=false, bool is_autoinc=false, bool is_key=false, const std::string &alias=0) |
| Holds information about a SQL field declared in the SSQLS v2 language. More...
|
|
void | print (std::ostream &os) const |
| Print field description out to a stream in SSQLS v2 form.
|
|
virtual | ~Line () |
| Virtual dtor, since this is a base class.
|
|
|
static Field * | parse (const StringList &tl, bool subdirective, const File &file) |
| Attempt to create a Field object from information in the passed StringList. More...
|
|
static Line * | parse (const StringList &tl, bool subdirective, const File &file) |
| Virtual ctor, creating one of our subclass objects based on what we're passed. More...
|
|
|
| Line () |
| Protected ctor, to prevent instantiation.
|
|
◆ Field()
ParseV2::Field::Field |
( |
const std::string & |
name, |
|
|
const std::string & |
type, |
|
|
bool |
is_unsigned = false , |
|
|
bool |
is_null = false , |
|
|
bool |
is_autoinc = false , |
|
|
bool |
is_key = false , |
|
|
const std::string & |
alias = 0 |
|
) |
| |
|
inline |
Holds information about a SQL field declared in the SSQLS v2 language.
- Parameters
-
type | the field's SQL type |
is_unsigned | true if type is an integer and is unsigned |
is_null | true if field's value is nullable |
is_autoinc | true if DB automatically assigns an auto-incrementing value to this field in INSERT if it isn't specified |
is_key | true if field is part of the primary key |
name | the field's SQL name |
alias | the field's C++ name, defaulting to the SQL name |
◆ parse()
Attempt to create a Field object from information in the passed StringList.
A kind of pre-processor for the Field ctor, creating one of those objects only if the given StringList makes sense, using the values we find in that StringList as parameters to the ctor.
References ParseV2::File::parse_error().
Referenced by ParseV2::Line::parse().
The documentation for this class was generated from the following files: