#include <dmprovider/SchemaTableNode.h>
Inheritance diagram for BSchemaTableNode::RowNode:
This object provides read/write access to a particular row in the table, based on the table's schema.
Implementation | |
Reimplement RowNode to modify the database contents. | |
virtual status_t | AddEntry (const SString &name, const SValue &entry) |
If the entry exists, call through to StoreValueAtLocked. | |
virtual size_t | CountEntriesLocked () const |
Return BSchemaTableNode::CountColumnsLocked(). | |
virtual sptr< IDatum > | CreateDatum (SString *name, uint32_t flags, status_t *err) |
Return B_UNSUPPORTED - though should it allow "creation" of data with the right name? | |
virtual sptr< INode > | CreateNode (SString *name, status_t *err) |
Return B_UNSUPPORTED - rows can't create new sub-tables without implementing a join. | |
virtual ssize_t | EntryIndexOfLocked (const SString &entry) const |
Return BSchemaTableNode::ColumnIndexOfLocked(). | |
virtual SString | EntryNameAtLocked (size_t index) const |
Return BSchemaTableNode::ColumnNameAtLocked(). | |
virtual SString | MimeTypeLocked () const |
Return BSchemaTableNode::RowMimeTypeLocked(). | |
virtual status_t | RemoveEntry (const SString &name) |
Return B_UNSUPPORTED - can't remove entries from a single row, have to use ITable. | |
virtual status_t | RenameEntry (const SString &entry, const SString &name) |
Return B_UNSUPPORTED - can't rename entries in a single row, have to use ITable. | |
virtual void | ReportChangeAtLocked (size_t index, const sptr< IBinder > &editor, uint32_t changes, off_t start=-1, off_t length=-1) |
Call BIndexedTableNode::ReportChangeAtLocked(m_index, index, ...). | |
virtual off_t | SizeAtLocked (size_t index) const |
Return size by directly accessing database. | |
virtual status_t | StoreMimeTypeLocked (const SString &value) |
Return B_UNSUPPORTED (clients can not modify the MIME type). | |
virtual status_t | StoreSizeAtLocked (size_t index, off_t size) |
Change size by directly accessing database, if this is a variable size column. | |
virtual status_t | StoreValueAtLocked (size_t index, const SValue &value) |
Modify contents of database. | |
virtual status_t | StoreValueTypeAtLocked (size_t index, uint32_t type) |
Return B_UNSUPPORTED -- value type comes from schema column. | |
virtual SValue | ValueAtLocked (size_t index) const |
Retrieve data as a value. | |
Bookkeeping | |
Creation, destruction, locking, etc. | |
virtual lock_status_t | Lock () const |
Reimplemented to use the BSchemaTableNode lock. | |
RowNode (const SContext &context, const sptr< BSchemaTableNode > &owner, uint32_t rowID) | |
Reimplemented to use the BSchemaTableNode lock. | |
virtual void | Unlock () const |
Reimplemented to use the BSchemaTableNode lock. | |
SContext | Context () |
Disambiguate. | |
virtual status_t | FinishAtom (const void *id) |
The destructor must call Lock(), so return FINISH_ATOM_ASYNC to avoid deadlocks. | |
virtual bool | HoldRefForLink (const SValue &binding, uint32_t flags) |
Make this object stay around while there are links on it. | |
virtual void | InitAtom () |
Initialize both base classes. | |
virtual SValue | Inspect (const sptr< IBinder > &caller, const SValue &which, uint32_t flags) |
Make BIndexedDataNode, ICatalog and IReferable accessible. | |
virtual | ~RowNode () |
Reimplemented to use the BSchemaTableNode lock. | |
IReferable Implementation | |
virtual SString | Reference () const |
Official path to this object. | |
Public Attributes | |
const uint32_t | m_rowID |
|
Reimplemented to use the BSchemaTableNode lock.
|
|
Reimplemented to use the BSchemaTableNode lock.
|
|
If the entry exists, call through to StoreValueAtLocked. It seems like it wouldn't be hard to support all of the "extra" fields directly in the regular row, which would make the row impelenting ICatalog make a bit more sense. Not sure if we actually want to do this or not; it's a policy decision. Implements ICatalog. |
|
Disambiguate.
Reimplemented from BIndexedDataNode. |
|
Return BSchemaTableNode::CountColumnsLocked().
Implements BIndexedDataNode. |
|
Return B_UNSUPPORTED - though should it allow "creation" of data with the right name?
Implements ICatalog. |
|
Return B_UNSUPPORTED - rows can't create new sub-tables without implementing a join.
Implements ICatalog. |
|
Return BSchemaTableNode::ColumnIndexOfLocked().
Implements BIndexedDataNode. |
|
Return BSchemaTableNode::ColumnNameAtLocked().
Implements BIndexedDataNode. |
|
The destructor must call Lock(), so return FINISH_ATOM_ASYNC to avoid deadlocks.
Reimplemented from SAtom. |
|
Make this object stay around while there are links on it.
Reimplemented from BBinder. |
|
Initialize both base classes.
Reimplemented from BSchemaTableNode::DataAccessor. |
|
Make BIndexedDataNode, ICatalog and IReferable accessible.
Reimplemented from BnReferable. |
|
Reimplemented to use the BSchemaTableNode lock.
Reimplemented from BIndexedDataNode. |
|
Return BSchemaTableNode::RowMimeTypeLocked().
Reimplemented from BMetaDataNode. |
|
Official path to this object. This property holds the canonical path at which you can find the object being queried. The returned path is always of the form "/some/path/to/me"; that is, SContext::Lookup() can be used to resolve the path back to the object.
Implements IReferable. |
|
Return B_UNSUPPORTED - can't remove entries from a single row, have to use ITable.
Implements ICatalog. |
|
Return B_UNSUPPORTED - can't rename entries in a single row, have to use ITable.
Implements ICatalog. |
|
Call BIndexedTableNode::ReportChangeAtLocked(m_index, index, ...).
Reimplemented from BIndexedDataNode. |
|
Return size by directly accessing database.
Reimplemented from SDatumGeneratorInt. |
|
Return B_UNSUPPORTED (clients can not modify the MIME type).
Reimplemented from BMetaDataNode. |
|
Change size by directly accessing database, if this is a variable size column.
Reimplemented from SDatumGeneratorInt. |
|
Modify contents of database.
Implements BIndexedDataNode. |
|
Return B_UNSUPPORTED -- value type comes from schema column.
Reimplemented from SDatumGeneratorInt. |
|
Reimplemented to use the BSchemaTableNode lock.
Reimplemented from BIndexedDataNode. |
|
Retrieve data as a value.
Implements BIndexedDataNode. |
|
|