COOPY » Guide
version 0.6.5
|
General column type (text, integer, etc). More...
#include <ColumnInfo.h>
Public Types | |
enum | { COLUMN_FAMILY_NONE, COLUMN_FAMILY_INTEGER, COLUMN_FAMILY_REAL, COLUMN_FAMILY_TEXT, COLUMN_FAMILY_DATETIME, COLUMN_FAMILY_BOOLEAN, COLUMN_FAMILY_CURRENCY, COLUMN_FAMILY_BLOB, COLUMN_SOURCE_NONE, COLUMN_SOURCE_SQLITE, COLUMN_SOURCE_MYSQL, COLUMN_SOURCE_EXCEL, COLUMN_SOURCE_CSV, COLUMN_SOURCE_ACCESS } |
Public Member Functions | |
ColumnType () | |
ColumnType (const std::string &name) | |
void | reset () |
bool | setType (const std::string &name, const std::string &lang="unknown") |
std::string | asSqlite (bool addPrimaryKey) const |
Data Fields | |
std::string | src_name |
std::string | src_lang |
bool | allowNull |
int | family |
int | src |
int | size |
int | size2 |
bool | primaryKey |
bool | primaryKeySet |
bool | autoIncrement |
bool | autoIncrementSet |
std::string | foreignTable |
std::string | foreignKey |
bool | foreignKeySet |
General column type (text, integer, etc).
Definition at line 17 of file ColumnInfo.h.
anonymous enum |
Definition at line 19 of file ColumnInfo.h.
coopy::store::ColumnType::ColumnType | ( | ) | [inline] |
Definition at line 53 of file ColumnInfo.h.
References reset().
coopy::store::ColumnType::ColumnType | ( | const std::string & | name | ) | [inline] |
Definition at line 57 of file ColumnInfo.h.
References setType().
std::string ColumnType::asSqlite | ( | bool | addPrimaryKey | ) | const |
Definition at line 60 of file ColumnInfo.cpp.
References allowNull, COLUMN_FAMILY_BLOB, COLUMN_FAMILY_BOOLEAN, COLUMN_FAMILY_DATETIME, COLUMN_FAMILY_INTEGER, COLUMN_FAMILY_REAL, COLUMN_FAMILY_TEXT, family, primaryKey, and primaryKeySet.
Referenced by coopy::store::TextBook::copy(), and coopy::store::sqlite::SqliteSheet::create().
void coopy::store::ColumnType::reset | ( | ) | [inline] |
Definition at line 61 of file ColumnInfo.h.
References allowNull, autoIncrement, autoIncrementSet, COLUMN_FAMILY_NONE, COLUMN_SOURCE_NONE, family, foreignKeySet, primaryKey, primaryKeySet, size, size2, src, src_lang, and src_name.
Referenced by ColumnType(), and setType().
bool ColumnType::setType | ( | const std::string & | name, |
const std::string & | lang = "unknown" |
||
) |
Definition at line 9 of file ColumnInfo.cpp.
References COLUMN_FAMILY_BLOB, COLUMN_FAMILY_BOOLEAN, COLUMN_FAMILY_CURRENCY, COLUMN_FAMILY_DATETIME, COLUMN_FAMILY_INTEGER, COLUMN_FAMILY_NONE, COLUMN_FAMILY_REAL, COLUMN_FAMILY_TEXT, coopy_is_strict(), family, reset(), src_lang, and src_name.
Referenced by ColumnType(), coopy::cmp::DataStat::evaluate2(), coopy::store::remotesql::RemoteSqlSheet::getColumnInfo(), and coopy::store::ColumnInfo::setType().
Definition at line 39 of file ColumnInfo.h.
Referenced by asSqlite(), coopy::store::remotesql::RemoteSqlSheet::getColumnInfo(), and reset().
Definition at line 46 of file ColumnInfo.h.
Referenced by coopy::cmp::Patcher::addPoolsFromSchema(), coopy::store::TextBook::fixSchema(), coopy::store::remotesql::RemoteSqlSheet::getColumnInfo(), reset(), and coopy::store::ColumnInfo::setAutoIncrement().
Definition at line 47 of file ColumnInfo.h.
Referenced by coopy::store::TextBook::fixSchema(), coopy::store::remotesql::RemoteSqlSheet::getColumnInfo(), reset(), and coopy::store::ColumnInfo::setAutoIncrement().
Definition at line 40 of file ColumnInfo.h.
Referenced by asSqlite(), cellToJson(), reset(), and setType().
std::string coopy::store::ColumnType::foreignKey |
Definition at line 50 of file ColumnInfo.h.
Referenced by coopy::cmp::Patcher::addPoolsFromSchema(), coopy::store::sqlite::SqliteSheet::create(), coopy::store::TextBook::fixSchema(), coopy::store::ColumnInfo::isForeignKey(), and coopy::store::ColumnInfo::setReference().
Definition at line 51 of file ColumnInfo.h.
Referenced by coopy::store::sqlite::SqliteSheet::create(), coopy::store::TextBook::fixSchema(), coopy::store::ColumnInfo::hasForeignKey(), reset(), and coopy::store::ColumnInfo::setReference().
std::string coopy::store::ColumnType::foreignTable |
Definition at line 49 of file ColumnInfo.h.
Referenced by coopy::cmp::Patcher::addPoolsFromSchema(), coopy::store::sqlite::SqliteSheet::create(), coopy::store::TextBook::fixSchema(), and coopy::store::ColumnInfo::setReference().
Definition at line 44 of file ColumnInfo.h.
Referenced by asSqlite(), coopy::store::TextBook::fixSchema(), coopy::store::remotesql::RemoteSqlSheet::getColumnInfo(), coopy::store::mdb::JackSheet::getColumnInfo(), coopy::store::mdb::AccessSheet::getColumnInfo(), coopy::store::ColumnInfo::isPrimaryKey(), reset(), and coopy::store::ColumnInfo::setPk().
Definition at line 45 of file ColumnInfo.h.
Referenced by asSqlite(), coopy::store::TextBook::fixSchema(), coopy::store::remotesql::RemoteSqlSheet::getColumnInfo(), coopy::store::mdb::JackSheet::getColumnInfo(), coopy::store::mdb::AccessSheet::getColumnInfo(), coopy::store::ColumnInfo::hasPrimaryKey(), reset(), and coopy::store::ColumnInfo::setPk().
Definition at line 42 of file ColumnInfo.h.
Referenced by reset(), and coopy::store::SchemaSniffer::sniff().
Definition at line 43 of file ColumnInfo.h.
Referenced by reset().
Definition at line 41 of file ColumnInfo.h.
Referenced by reset().
std::string coopy::store::ColumnType::src_lang |
Definition at line 38 of file ColumnInfo.h.
std::string coopy::store::ColumnType::src_name |
Definition at line 37 of file ColumnInfo.h.
Referenced by coopy::store::sqlite::SqliteSheet::create(), reset(), and setType().