Store generic data using Meya's table scope database

Meya also provides a database for storing general object data. This data is stored in table scope datastore (read more). Objects are stored in table and are assigned a unique object_id.

Object examples

  • orders (timestamp, price, item)
  • tickets (issue, user)
  • menu items (item, ingredients, price)
  • products (SKU, name, description, price, image_url)
  • category (name, parent)
  • settings (key, val)
FieldNote
id
string
The immutable unique identifier generated by Meya. ex. O4PTHV5E87T
......
{key}
string
Of type: string, integer, float, boolean, dict, list
{
  "name": "pizza Margherita",
  "ingredients": [
    "crust",
    "tomato sauce",
    "mozzarella",
    "basil"
  ],
  "price": 11.25,
  "image_url": "http://imgur.com/cIf35KH",
  "id": "O4PTHV5E87T",
  "bot_id": "BJty7evfw2b"
}

Accessing objects from bot

This data can be accessed from your bot component code:

pizza = self.db.table("food").get("O4PTHV5E87T")