Trading System API  3.0
Library for Simulating and Deploying Trading and Investment Strategies
tsa::file_import_rules__obsolete Class Reference

Describes the rules by which a file is to be imported. This structure is to be used in conjunction with the database::import_file() member. More...

#include <TSADBSeriesImport.h>

Inheritance diagram for tsa::file_import_rules__obsolete:
tsa::object

Public Attributes

bool auto_clear_overlap = false
 true to automatically clear overlap.
 
size_t buffer_size = 10000
 Size of the buffer.
 
std::string columns
 The field definitions (mandatory). Must be submitted as a data_def string (e.g. "open:d,high:d,low:d,close:d"). See class data_def for details. Note: Timestamp fields are implicit to every record. Do not add a timestamp field unless you need another timestamp that is unrelated to the record timestamp itself, which is created automatically.
 
bool create_table = true
 true to create a database table if it does not exist.
 
std::string date_format
 The date format (e.g. yyyymmdd, yyyy-mm-dd, dd/mm/yyyy, etc.). See class date for details.
 
char datetime_separator = ' '
 If the timestamp consists of both a date and time, the separator character is assumed to be a space ' ' character (e.g. 1999-12-31 23:59:59.99999). If this is not the case, please set the date-time separator character here.
 
bool delete_existing_table = false
 Flag to delete an existing table with given name if it exists at time of import. false by default.
 
char field_separator = 0
 The field separator character (mandatory). Set the character that separates the fields in each record. If reading a .csv file, this will be a ',' character.
 
os::path file_path
 Full pathname of the file.
 
bool fix_duplicate_timestamps = false
 Often intraday data will not have a high enough timestamp resolution to guarantee unique records. If the data file contains records with duplicate timestamps, then this flag can be set to true to force the system to automatically fix a duplicate timestamp (By adding a microsecond). The flag is false by default.
 
date_time skip_above = date_time::max
 The skip above.
 
date_time skip_below = date_time::min
 The skip below.
 
bool skip_first_line = false
 Skip the first line, in case the first line does not contain data.
 
std::string target_table
 The table name (mandatory).
 
bool timestamp_one_field = true
 Timestamp information (date and time) is assumed to be in a single record field, at the beginning of each record. If date and time are in two separate fields, mark this flag as false.
 

Additional Inherited Members

- Public Member Functions inherited from tsa::object
 object (void)
 Constructor.
 
virtual ~object (void)
 Destructor.
 
const char * class_name (void) const
 Returns the class name as returned by the 'Real Time Type Information' (RTTI) mechanism. More...
 
bool has_same_class_as (const object &other) const
 Returns true if self has the same type as other object. More...
 

Detailed Description

Describes the rules by which a file is to be imported. This structure is to be used in conjunction with the database::import_file() member.