Merge pull request #12 from realm/tg-core-0.94.4
Update for core 0.94.4
This commit is contained in:
commit
e9ca54e169
|
@ -175,7 +175,7 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool select_link_list(size_t col, size_t row)
|
bool select_link_list(size_t col, size_t row, size_t)
|
||||||
{
|
{
|
||||||
m_active_linklist = nullptr;
|
m_active_linklist = nullptr;
|
||||||
for (auto& o : m_observers) {
|
for (auto& o : m_observers) {
|
||||||
|
@ -303,15 +303,22 @@ public:
|
||||||
bool set_date_time(size_t col, size_t row, DateTime) { return mark_dirty(row, col); }
|
bool set_date_time(size_t col, size_t row, DateTime) { return mark_dirty(row, col); }
|
||||||
bool set_table(size_t col, size_t row) { return mark_dirty(row, col); }
|
bool set_table(size_t col, size_t row) { return mark_dirty(row, col); }
|
||||||
bool set_mixed(size_t col, size_t row, const Mixed&) { return mark_dirty(row, col); }
|
bool set_mixed(size_t col, size_t row, const Mixed&) { return mark_dirty(row, col); }
|
||||||
bool set_link(size_t col, size_t row, size_t) { return mark_dirty(row, col); }
|
bool set_link(size_t col, size_t row, size_t, size_t) { return mark_dirty(row, col); }
|
||||||
bool set_null(size_t col, size_t row) { return mark_dirty(row, col); }
|
bool set_null(size_t col, size_t row) { return mark_dirty(row, col); }
|
||||||
bool nullify_link(size_t col, size_t row) { return mark_dirty(row, col); }
|
bool nullify_link(size_t col, size_t row, size_t) { return mark_dirty(row, col); }
|
||||||
|
|
||||||
// Doesn't change any data
|
// Doesn't change any data
|
||||||
bool optimize_table() { return true; }
|
bool optimize_table() { return true; }
|
||||||
|
|
||||||
// Used for subtables, which we currently don't support
|
// Used for subtables, which we currently don't support
|
||||||
bool select_descriptor(int, const size_t*) { return false; }
|
bool select_descriptor(int, const size_t*) { return false; }
|
||||||
|
|
||||||
|
// Not implemented
|
||||||
|
bool insert_substring(size_t, size_t, size_t, StringData) { return false; }
|
||||||
|
bool erase_substring(size_t, size_t, size_t, size_t) { return false; }
|
||||||
|
bool swap_rows(size_t, size_t) { return false; }
|
||||||
|
bool move_column(size_t, size_t) { return false; }
|
||||||
|
bool move_group_level_table(size_t, size_t) { return false; }
|
||||||
};
|
};
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace realm {
|
namespace realm {
|
||||||
class Property;
|
|
||||||
class Group;
|
class Group;
|
||||||
|
struct Property;
|
||||||
|
|
||||||
class ObjectSchema {
|
class ObjectSchema {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -562,11 +562,7 @@ InvalidNullabilityException::InvalidNullabilityException(std::string const& obje
|
||||||
m_what = "'Object' property '" + property.name + "' must be nullable.";
|
m_what = "'Object' property '" + property.name + "' must be nullable.";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#if REALM_NULL_STRINGS == 1
|
|
||||||
m_what = "Array or Mixed property '" + property.name + "' cannot be nullable";
|
m_what = "Array or Mixed property '" + property.name + "' cannot be nullable";
|
||||||
#else
|
|
||||||
m_what = "Only 'Object' property types are nullable";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,11 +71,7 @@ void Schema::validate() const
|
||||||
|
|
||||||
// check nullablity
|
// check nullablity
|
||||||
if (prop.is_nullable) {
|
if (prop.is_nullable) {
|
||||||
#if REALM_NULL_STRINGS == 1
|
|
||||||
if (prop.type == PropertyTypeArray || prop.type == PropertyTypeAny) {
|
if (prop.type == PropertyTypeArray || prop.type == PropertyTypeAny) {
|
||||||
#else
|
|
||||||
if (prop.type != PropertyTypeObject) {
|
|
||||||
#endif
|
|
||||||
exceptions.emplace_back(InvalidNullabilityException(object.name, prop));
|
exceptions.emplace_back(InvalidNullabilityException(object.name, prop));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,4 +52,4 @@ public:
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined(REALM_SCHEMA_HPP) */
|
#endif /* defined(REALM_SCHEMA_HPP) */
|
||||||
|
|
Loading…
Reference in New Issue