#include <rvc/dbtable.h>
| typedef ENUMSET<USAGE, USAGE_LAST> RVC::DBTABLE::FIELDINFO::USAGESET |
pseudo fields for FIELDINFO.next_field.
Some database schemas require a 2 part key where the primary key is made up of 2 fields but the foreign key is made up of 1 field and the name of the field or one field and a "domid" which is looked up from a 3rd table by using the table/field name. We look those up on import and record them in the FIELDINFO.domid. I don't know of anything that would use the table name, but I added it for completeness
| TYPE_Invalid |
Invalid field type. |
| TYPE_String |
ASCII character string, null-terminated. |
| TYPE_Char |
Single ASCII character. |
| TYPE_UINT8 |
Unsigned 1-byte integer (0-255). |
| TYPE_SINT8 |
Signed 1-byte integer (-128-128). |
| TYPE_UINT16 |
Unsigned 2-byte integer (0-65535). |
| TYPE_SINT16 |
Signed 2-byte integer (-32768-32767). |
| TYPE_UINT32 |
Unsigned 4-byte integer (0 - 2^32-1). |
| TYPE_SINT32 |
Signed 4-byte integer (-2^31 - 2^31-1). |
| TYPE_Float |
4-byte floating-point number |
| TYPE_Double |
8-byte floating-point number |
| TYPE_Logical |
1-byte logical (?/Y/y/N/n/T/t/F/f/0/1) |
| TYPE_Date |
4-byte integer date YYYYMMDD |
| TYPE_UINT64 |
Unsigned 8-byte integer (0 - 2^64-1). |
| TYPE_SINT64 |
Signed 8-byte integer (-2^63 - 2^63-1). |
| TYPE_Color |
Color spec. Always 8 bytes (COLOR). |
| TYPE_Binary |
Binary field. |
| TYPE_Memo |
Memo field. |
| TYPE_Unicode |
MIUNICODE string, null-terminated. |
| TYPE_DateTime |
Date/Time field, 100-nanosecond intervals from 1-Jan-1601. |
| TYPE_NUMTYPES |
Number of defined field types. |
| RVC::DBTABLE::FIELDINFO::FIELDINFO | ( | ) |
Default constructor.
| RVC::DBTABLE::FIELDINFO::FIELDINFO | ( | const FIELDINFO & | rhs | ) |
Copy constructor.
| RVC::DBTABLE::FIELDINFO::~FIELDINFO | ( | ) |
| void RVC::DBTABLE::FIELDINFO::Clear | ( | ) |
Clear the field info of current values.
| void RVC::DBTABLE::FIELDINFO::ClearFlag | ( | FLAGS | flag | ) |
Clear a single flag.
| void RVC::DBTABLE::FIELDINFO::ClearLink | ( | ) |
Clear a link from this field to another table.
| void RVC::DBTABLE::FIELDINFO::ClearNextLinkField | ( | ) |
Clear the next field number that this field is linked to.
Compare two field types and return best field type to convert to.
| ExactMatch | Set to 'true' if the two fields match exactly, 'false' if they do not |
| UINT32 RVC::DBTABLE::FIELDINFO::GetAutoIncrement | ( | ) | const |
Get the AutoIncrement number for the next added record.
| const RVC::DBTABLE::CONSTRAINT& RVC::DBTABLE::FIELDINFO::GetConstraint | ( | ) | const [inline] |
| int RVC::DBTABLE::FIELDINFO::GetDecimalPlaces | ( | ) | const |
Get number of decimal places to display for floating point fields.
| const RVC::DESCRIPTOR& RVC::DBTABLE::FIELDINFO::GetDescriptor | ( | ) | const [inline] |
| int RVC::DBTABLE::FIELDINFO::GetDispUnits | ( | ) | const |
Get the display units for this field.
| int RVC::DBTABLE::FIELDINFO::GetDispWidth | ( | ) | const |
Get number of columns to display.
| const RVC::OBJECTNAME& RVC::DBTABLE::FIELDINFO::GetDomainID | ( | ) | const |
Get the domain ID for this field.
| FLAGS RVC::DBTABLE::FIELDINFO::GetFlags | ( | ) | const |
Get the flags for this field.
| FORMAT RVC::DBTABLE::FIELDINFO::GetFormat | ( | ) | const |
Get the format of the field.
Currently only used for BLOB fields to record what kind of data is stored in the blob.
| const MISTRING& RVC::DBTABLE::FIELDINFO::GetFullName | ( | ) | const [inline] |
| DEPRECATED const RVC::OBJECTNAME& RVC::DBTABLE::FIELDINFO::GetName | ( | ) | const [inline] |
| INT32 RVC::DBTABLE::FIELDINFO::GetNextLinkField | ( | ) | const |
Get the next field number that this field is linked to.
| INT32 RVC::DBTABLE::FIELDINFO::GetOffset | ( | ) | const |
| NEXTFIELD RVC::DBTABLE::FIELDINFO::GetPseudoNextLinkField | ( | ) | const |
Get the next field pseudo number that this field is linked to.
| INT32 RVC::DBTABLE::FIELDINFO::GetRelatedField | ( | ) | const |
Get the field number that this field is linked to, use HasRelation() to determine if the field is related to another table / field.
| INT32 RVC::DBTABLE::FIELDINFO::GetRelatedTable | ( | ) | const |
Get the table number that this field is linked to, use HasRelation() to determine if the field is related to another table / field.
| const RVC::OBJECTNAME& RVC::DBTABLE::FIELDINFO::GetShortName | ( | ) | const |
| INT32 RVC::DBTABLE::FIELDINFO::GetSize | ( | ) | const |
Get the size of the field in bytes.
| TYPE RVC::DBTABLE::FIELDINFO::GetType | ( | ) | const |
Get the type of the field.
| UOM::UNIT RVC::DBTABLE::FIELDINFO::GetUnits | ( | bool | bGetUnitsShown = false |
) | const |
Get the numeric units for this field.
By default this method returns the units stored in the database. You can also get user's preferred units to view the field in, but that's mostly for historical reasons, as this preference is usually stored in a subobject of the table, not in the field info.
| void RVC::DBTABLE::FIELDINFO::GetUnits | ( | UNITCONV & | conv, | |
| bool | bGetUnitsShown = false | |||
| ) | const |
Get the numeric units for this field for unit conversion.
| int RVC::DBTABLE::FIELDINFO::GetUnitType | ( | ) | const |
| USAGE RVC::DBTABLE::FIELDINFO::GetUsage | ( | ) | const |
Get the usage of the field.
| bool RVC::DBTABLE::FIELDINFO::HasNextKey | ( | ) | const |
Does the field have a next key field link?
| bool RVC::DBTABLE::FIELDINFO::HasPseudoNextKey | ( | ) | const |
Does the field have a next key pseudo field link?
| bool RVC::DBTABLE::FIELDINFO::HasRelation | ( | ) | const |
Is the field related to another table / field.
| bool RVC::DBTABLE::FIELDINFO::IsNumeric | ( | ) | const |
Is the field numeric? (not a string that can be converted to a number).
| bool RVC::DBTABLE::FIELDINFO::IsString | ( | ) | const |
Is the field a string?
| void RVC::DBTABLE::FIELDINFO::ResetPosition | ( | ) |
Reset position information about the field.
| void RVC::DBTABLE::FIELDINFO::SetAutoIncrement | ( | UINT32 | count | ) |
Set the AutoIncrement number for the next added record.
| void RVC::DBTABLE::FIELDINFO::SetConstraint | ( | const RVC::DBTABLE::CONSTRAINT & | Constraint | ) | [inline] |
| void RVC::DBTABLE::FIELDINFO::SetDecimalPlaces | ( | int | decplaces | ) |
Set the number of decimal places for floating point fields.
| void RVC::DBTABLE::FIELDINFO::SetDescription | ( | const MISTRING & | Description | ) | [inline] |
| void RVC::DBTABLE::FIELDINFO::SetDescriptor | ( | const RVC::DESCRIPTOR & | Descriptor | ) | [inline] |
| void RVC::DBTABLE::FIELDINFO::SetDispUnits | ( | int | unit | ) |
Set the display units for this field.
| void RVC::DBTABLE::FIELDINFO::SetDispWidth | ( | int | width | ) |
Set the display width (number of columns) for the field.
| void RVC::DBTABLE::FIELDINFO::SetDomainID | ( | const RVC::OBJECTNAME & | name | ) |
Set the Domain ID for this field.
| void RVC::DBTABLE::FIELDINFO::SetFlag | ( | FLAGS | flag | ) |
Set a single flag.
| void RVC::DBTABLE::FIELDINFO::SetFlags | ( | FLAGS | flags | ) |
Set field flags.
| void RVC::DBTABLE::FIELDINFO::SetFormat | ( | FORMAT | format | ) |
get the format of the field.
Currently only used for BLOB fields to record what kind of data is stored in the blob.
Set this field to link to a field in another table.
Set this field to link to a field in another table.
| void RVC::DBTABLE::FIELDINFO::SetName | ( | TEXTID | name | ) |
Set the name of this field The TEXTID version is necessary to resolve an abmiguious function call since MISTRING and RVC::OBJECTNAME both have implicit ctors from TEXTID.
| void RVC::DBTABLE::FIELDINFO::SetName | ( | const MISTRING & | name | ) |
Set the name of this field.
| void RVC::DBTABLE::FIELDINFO::SetName | ( | const RVC::OBJECTNAME & | name | ) |
Set the name of this field.
| void RVC::DBTABLE::FIELDINFO::SetNextLinkField | ( | NEXTFIELD | NextFieldNum | ) |
Set this field to link to a field in another table.
| void RVC::DBTABLE::FIELDINFO::SetNextLinkField | ( | INT32 | NextFieldNum | ) |
Set the next field number that this field is linked to.
| void RVC::DBTABLE::FIELDINFO::SetOffset | ( | int | offset | ) |
Set the offset into the buffer for data of this field.
You don't normally have to set this. It will be set for you when you create the table.
| void RVC::DBTABLE::FIELDINFO::SetSize | ( | INT32 | size | ) |
Set the size of this field in bytes.
| void RVC::DBTABLE::FIELDINFO::SetType | ( | TYPE | type | ) |
Set the field type.
| void RVC::DBTABLE::FIELDINFO::SetUnits | ( | UOM::IDNUM | units, | |
| bool | bSetUnitsStored = true, |
|||
| bool | bSetUnitsShown = true | |||
| ) |
Set the field units This method allows you to choose to set only the units stored or the units shown.
The "units shown" is mostly for historical reasons.
| void RVC::DBTABLE::FIELDINFO::SetUnits | ( | const UOM::UNIT & | units, | |
| bool | bSetUnitsStored = true, |
|||
| bool | bSetUnitsShown = true | |||
| ) |
Set the field units This method allows you to choose to set only the units stored or the units shown.
The "units shown" is mostly for historical reasons.
| void RVC::DBTABLE::FIELDINFO::SetUnits | ( | const UNITCONV & | conv | ) |
Set the field units Note: this sets the unit type and the "Units Stored" but leaves the "Units Shown" alone.
| void RVC::DBTABLE::FIELDINFO::SetUnitsShown | ( | const UNITCONV & | conv | ) |
Set the field units Note: This will only set the "Units Shown", which is only used by Single Record View.
And it will refuse to change it if the UnitType of the conv parameter does not match the field's unit type.
| void RVC::DBTABLE::FIELDINFO::SetUsage | ( | USAGE | usage | ) |
Set the field usage.
1.6.1