summaryrefslogtreecommitdiff
path: root/ndb/src/ndbapi/NdbDictionary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src/ndbapi/NdbDictionary.cpp')
-rw-r--r--ndb/src/ndbapi/NdbDictionary.cpp81
1 files changed, 80 insertions, 1 deletions
diff --git a/ndb/src/ndbapi/NdbDictionary.cpp b/ndb/src/ndbapi/NdbDictionary.cpp
index b068ea6460f..413ad0745db 100644
--- a/ndb/src/ndbapi/NdbDictionary.cpp
+++ b/ndb/src/ndbapi/NdbDictionary.cpp
@@ -103,6 +103,11 @@ NdbDictionary::Column::getLength() const{
return m_impl.m_length;
}
+int
+NdbDictionary::Column::getSize() const{
+ return m_impl.m_attrSize;
+}
+
void
NdbDictionary::Column::setNullable(bool val){
m_impl.m_nullable = val;
@@ -234,7 +239,7 @@ NdbDictionary::Table::~Table(){
}
NdbDictionary::Table&
-NdbDictionary::Table::operator=(const NdbDictionary::Table::Table& table)
+NdbDictionary::Table::operator=(const NdbDictionary::Table& table)
{
m_impl.assign(table.m_impl);
@@ -268,6 +273,9 @@ NdbDictionary::Table::addColumn(const Column & c){
if(c.getPrimaryKey()){
m_impl.m_noOfKeys++;
}
+ if (col->getBlobType()) {
+ m_impl.m_noOfBlobs++;
+ }
m_impl.buildColumnHash();
}
@@ -797,3 +805,74 @@ const struct NdbError &
NdbDictionary::Dictionary::getNdbError() const {
return m_impl.getNdbError();
}
+
+NdbOut& operator <<(NdbOut& ndbout, const NdbDictionary::Column::Type type)
+{
+ switch(type){
+ case NdbDictionary::Column::Bigunsigned:
+ ndbout << "Bigunsigned";
+ break;
+ case NdbDictionary::Column::Unsigned:
+ ndbout << "Unsigned";
+ break;
+ case NdbDictionary::Column::Smallunsigned:
+ ndbout << "Smallunsigned";
+ break;
+ case NdbDictionary::Column::Tinyunsigned:
+ ndbout << "Tinyunsigned";
+ break;
+ case NdbDictionary::Column::Bigint:
+ ndbout << "Bigint";
+ break;
+ case NdbDictionary::Column::Int:
+ ndbout << "Int";
+ break;
+ case NdbDictionary::Column::Smallint:
+ ndbout << "Smallint";
+ break;
+ case NdbDictionary::Column::Tinyint:
+ ndbout << "Tinyint";
+ break;
+ case NdbDictionary::Column::Char:
+ ndbout << "Char";
+ break;
+ case NdbDictionary::Column::Varchar:
+ ndbout << "Varchar";
+ break;
+ case NdbDictionary::Column::Float:
+ ndbout << "Float";
+ break;
+ case NdbDictionary::Column::Double:
+ ndbout << "Double";
+ break;
+ case NdbDictionary::Column::Mediumint:
+ ndbout << "Mediumint";
+ break;
+ case NdbDictionary::Column::Mediumunsigned:
+ ndbout << "Mediumunsigend";
+ break;
+ case NdbDictionary::Column::Binary:
+ ndbout << "Binary";
+ break;
+ case NdbDictionary::Column::Varbinary:
+ ndbout << "Varbinary";
+ break;
+ case NdbDictionary::Column::Decimal:
+ ndbout << "Decimal";
+ break;
+ case NdbDictionary::Column::Timespec:
+ ndbout << "Timespec";
+ break;
+ case NdbDictionary::Column::Blob:
+ ndbout << "Blob";
+ break;
+ case NdbDictionary::Column::Undefined:
+ ndbout << "Undefined";
+ break;
+ default:
+ ndbout << "Unknown type=" << (Uint32)type;
+ break;
+ }
+
+ return ndbout;
+}