Bases: note.db_api.dbBaseClass
| Parameters: |
|
|---|
| Desc: | Deletes item with ID = itemID, takes care of IDs collection |
|---|---|
| Parameters: | itemID (int) – The item ID to delete |
| Raises: | ValueError |
| Returns ID: | The ID of the deleted item |
| Rval: | int |
| Desc: | Fetches a list of item types |
|---|---|
| Returns: | A list of item types: |
| Rval: | list |
| Desc: | Get all the notes in the given time window |
|---|---|
| Parameters: |
|
| Returns: | A list of IDs |
| Ravl: | list |
| Desc: | Fetches a list of all the done ToDs |
|---|---|
| Parameters: | done (bool) – done or undone? |
| Returns: | A list of matching IDs |
| Rval: | list |
| Desc: | Given an ID return the note JSON object {u’noteText’: u’note8’,
|
|---|---|
| Parameters: | itemID (int) – The item ID, an integer |
| Returns: | The matching note |
| Rval: | int |
| Desc: | Given an itemID, return the “type” i.e. the collection it belongs to. |
|---|---|
| Parameters: | itemID (int) – The item ID, an integer |
| Returns: | The note type |
| Rval: | str |
| Desc: | Get a new ID by either incrementing the currentMax ID or using an unusedID |
|---|---|
| Returns: | A new, valid, ID |
| Rval: | int |
| Parameters: |
|
|---|
| Desc: | Given a search term returns a list of results that match that term:
|
|---|---|
| Parameters: | searchInfo (str) – The search term |
| Returns: | A list of matching notes |
| Rval: | list |
Bases: object
| Param: | msg the JSON message from the client |
|---|---|
| Returns: | The reply from the db driver |
| Rvalue: | str |
Handle events from poll()
| Events: | A list of tuples form zmq.poll() |
|---|---|
| Returns: | None |
| Param: | msg the JSON message from the client |
|---|---|
| Returns: | The reply from the db driver |
| Rvalue: | str |
Handle a new note.
| Parameters: | msg (dict) – the received note |
|---|---|
| Returns: | The message to reply with |
| Return type: | str |
Handle a received message.
| Parameters: | msg (str) – the received message |
|---|---|
| Returns: | The message to reply with |
| Return type: | str |