#include <hk_column.h>
Inheritance diagram for hk_column:
If the the datasource is in alter or create mode you can change the column definition by using the following functions: set_name, set_columntype, set_size, set_notnull, set_primary
|
used from hk_column to define of what type it is. For details how the different column types are interpreted look up the documentation of your database server and the database driver. textcolumn : fixed length (usually in SQL defined as CHAR(size)) auto_inccolumn: if the databasedriver supports this columntype it will get a unique number automatically, whenever a new row will be added. Usually a readonly column smallintegercolumn: a integer range of at least -32768 to 32767 integercolumn: a integer with the maximum range the database server can handle smallfloatingcolumn: a floating column with a range of at least ???? floatingcolumn: a floating column with the maximum range the database server can handle datecolumn: a column to keep the day,month and year of a date datetimecolumn: a column to keep the day,month and year of a date PLUS the hour,minute and second of a time timecolumn: a column to keep the hour,minute and second of a time. binarycolumn: a column to store binary data of more or less any size. memocolumn: a column to store text data of more or less any size. boolcolumn: a column that has 2 states 'true' or 'false' othercolumn: a column hk_classes does not know, but tries to handle as good as it can. |
|
|
|
|
|
|
|
returns the value of the column as raw data.
|
|
returns the value of the column at a specific rowposition as raw data. |
|
returns the value of this column, type converted to a bool. (All columntypes except Binary). |
|
|
|
|
|
|
|
|
|
|
|
returns the value of this column, type converted to a hk_string. (All columntypes except BINARY).
|
|
returns the value at a specific position in the column. The row selector will not be changed, so the visible objects will not be informed. Use asstring in combination with hk_datasource::goto_row instead. |
|
|
|
|
|
returns the new data set by a function like asstring(hk_string& n); |
|
|
|
|
|
|
|
if new data was inserted with the method asstring and the changes have not yet been stored this method returns the changed data |
|
|
|
If you need the column type as a hk_string use columntype_name to translate.
|
|
to translate the columntype into a hk_string. |
|
|
|
|
|
returns the current value as a boolean value. The difference to asbool is, that it will return the changed_data if the current data was changed by setting the data with e.g. set_asbool() |
|
returns the current value as a floating point number . The difference to asdouble is, that it will return the changed_data if the current data was changed by setting the data with e.g. set_asdouble() |
|
returns the current value as a integer. The difference to asinteger is, that it will return the changed_data if the current data was changed by setting the data with e.g. set_asinteger() |
|
returns the current value as a string. The difference to asstring is, that it will return the changed_data if the current data was changed by setting the data with e.g. set_asstring() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A temporarily given unique number of this row |
|
search from the beginning to the end for searchtext
|
|
search for a specific value in a column
|
|
|
|
|
|
data type, name and some other metadata can only be changed if the datasource is either in create_mode or alter_mode (or while the datasource enables and automatically creates columns)
|
|
an internal used function which compares the column value at row number "pos" |
|
|
|
|
|
|
|
|
|
|
|
|
|
changes the value of the column with the content of the file"filename". Very useful for binary columns. |
|
name of the column |
|
set all changed data back to it's default value. Usually you donīt have to call this function |
|
|
|
save the value of this column in a file. Very useful for binary-columns |
|
a column of type autoinc is usually readonly. if allow_autoincwrite is set to true it will be writeable if the database driver supports it |
|
changes the value of the column in native form.(i.e. Binary data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
you have the possibility to set the values which the column will accept as true and false. i.e. 0 and 1 for numeric columns or for text columns yes and no, or true and false. |
|
can just be edited if the datasource is in the mode ALTER or CREATE. |
|
if the column is of type date, time or datetime you can specify the wished format with this function. See hk_datetime for details. |
|
if the column is of type date, time or datetime you can specify the wished format with this function. See hk_datetime for details. |
|
|
|
name of the column. Can just be edited if the datasource is in the mode ALTER or CREATE. |
|
can just be edited if the datasource is in the mode ALTER or CREATE. |
|
can only be edited if the datasource is in the mode ALTER or CREATE. |
|
If the datasource is of type ds_table you can allow or disallow data changes in this column. |
|
can just be edited if the datasource is in the mode ALTER or CREATE. |
|
if the column is of type date, time or datetime you can specify the wished format with this function. See hk_datetime for details. |
|
column length in bytes |
|
|
|
|
|
|
|
Columns can contain characters such as \0, \n, ' and so on. Some SQL Servers need to encode this data, so this function delivers the encoded and nonlocalized version. |
|
|
|
returns the new data set by a function like asstring(hk_string& n) in SQL server native form. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|