Matricsoft - software development
products > Quickdb > types
description
database creation
table creation
record creation
record retrieval
record operations
file operations
database operations
definition operations
exceptions
samples
header file

Types

enum EType
{
    db_int,
    db_string,
    db_long,
    db_ref
}

Definition of the field types

Each field in a table have a determined type (int, long, srting or ref):

  • db_int corresponds to an int
  • db_long correspond to a long (you can also save pointers, they are saved as long)
  • db_string corresponds to a string (any length is acceptable)
  • db_ref corresponds to an int (it is really the index of another record)

Quickdb is "strongly typed"

When you create a record, it is very important for you to respect the data type you used to define the table:

For instance, if you define a field with a "db_long" type and you don't five a long argument to the method set_field, the method will throw an exception (if you use a constant, you shall cast it: set_field(..., (long) 3);

This avoids errors.