15 #include "boost/date_time/gregorian/gregorian.hpp" 52 std::string namepk = datasetName+
"_pk";
77 boost::gregorian::date d1(boost::gregorian::greg_year(2010),boost::gregorian::greg_month(1),15);
87 dsItem02->
setDateTime(3, static_cast<te::dt::DateTime*>(datetime1->
clone()));
94 dsItem03->
setDateTime(3, static_cast<te::dt::DateTime*>(datetime1->
clone()));
97 boost::gregorian::date d2(boost::gregorian::greg_year(2010),boost::gregorian::greg_month(2),15);
111 dsItem05->
setDateTime(3, static_cast<te::dt::DateTime*>(datetime2->
clone()));
118 dsItem06->
setDateTime(3, static_cast<te::dt::DateTime*>(datetime2->
clone()));
121 boost::gregorian::date d3(boost::gregorian::greg_year(2010),boost::gregorian::greg_month(3),15);
135 dsItem08->
setDateTime(3,static_cast<te::dt::DateTime*>(datetime3->
clone()));
142 dsItem09->
setDateTime(3, static_cast<te::dt::DateTime*>(datetime3->
clone()));
159 catch(
const std::exception& e)
161 std::cout << std::endl <<
"An exception has occurred when Creating DataSet In Memory Example: " << e.what() << std::endl;
166 std::cout << std::endl <<
"An unexpected exception has occurred when Creating DataSet In Memory Example!" << std::endl;
This file contains include headers for the Data Type module of TerraLib.
void setAutoNumber(bool a)
It tells if the property is an autonumber or not.
void add(te::dt::Property *p)
It adds a property to the list of properties of the primary key.
void setGeometry(std::size_t i, te::gm::Geometry *value)
It sets the value of the i-th property.
This file contains include headers for the memory data source of TerraLib.
void setSRID(int srid)
It sets the spatial reference system identifier associated to this property.
An atomic property like an integer or double.
A class that models the description of a dataset.
void add(te::dt::Property *p)
It adds the property to the list of properties of the index.
static te::dt::Date ds(2010, 01, 01)
A class that describes a check constraint.
void setNumeric(std::size_t i, const std::string &value)
It sets the value of the i-th property.
void add(DataSetItem *item)
It adds a new item to the dataset and takes its ownership.
te::da::DataSet * CreatingDataSetInMemory(const std::string &datasetName)
It creates a data set in memory.
void setInt32(std::size_t i, boost::int32_t value)
It sets the value of the i-th property.
The type for arbitrary precison numbers, like numeric(p, q).
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
A point with x and y coordinate values.
A base class for date data types.
void setDateTime(std::size_t i, te::dt::DateTime *value)
It sets the value of the i-th property.
Examples on how to access/manipulate DataSources in TerraLib.
static te::dt::TimeDuration dt(20, 30, 50, 11)
virtual AbstractData * clone() const =0
It returns a clone of this object.
void add(Constraint *c)
It adds a new constraint.
An implementation of the DatasetItem class for the TerraLib In-Memory Data Access driver...
A dataset is the unit of information manipulated by the data access module of TerraLib.
It describes a primary key (pk) constraint.
void setExpression(const std::string &e)
It sets the check constraint expression.
The type for date and time types: date, date period, date duration, time duration, time instant, time period, time instant with time zone or time period with time zone.
It describes an index associated to a DataSetType.