Including relational data?
See original GitHub issueI was messing around with PostgREST before this and they have the concept of resource embedding to pull in related data. Is there anything similar here? It also seems like https://github.com/pyeve/eve-sqlalchemy supports this.
With sandman(1), it seems like the docs suggest that there should be links - altho there is a field named links, it’s not clear how that relates to items:
With sandman2, I don’t even see a link:
Schema constructed with a simple many-to-many relationship:
users_items_assoc = Table('users_items_assoc', Base.metadata,
Column('users_items_assoc_id', Integer, primary_key=True),
Column('user_id', Integer, ForeignKey('users.id')),
Column('item_id', Integer, ForeignKey('items.id'))
)
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
name = Column(String)
nickname = Column(String)
items = relationship('Item', back_populates='users', secondary=users_items_assoc)
def __repr__(self):
return f'{self.name}'
class Item(Base):
__tablename__ = 'items'
id = Column(Integer, primary_key=True)
name = Column(String)
description = Column(String)
users = relationship('User', back_populates='items', secondary=users_items_assoc)
# TODO: add image, upc, and so on
def __repr__(self):
return f'{self.name}'
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Relational Databases Explained - IBM
A relational database organizes data into rows and columns, which collectively form a table. Data is typically structured across multiple tables ...
Read more >13 Relational data - R for Data Science - Hadley Wickham
The most common place to find relational data is in a relational database management system (or RDBMS), a term that encompasses almost all...
Read more >What is a Relational Database? - TechTarget
A relational database is a collection of information that organizes data points with defined relationships for easy access. In the relational database model ......
Read more >What is a Relational Database (RDBMS)? - Oracle
A relational database is a type of database that stores and provides access to data points that are related to one another. Relational...
Read more >What Is A Relational Database (RDBMS)? - Google Cloud
A relational database is a collection of information that organizes data in predefined relationships where data is stored in one or more tables...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jcrben @rrjanbiah
sandman2
uses the Link Header, which is how this information is meant to be conveyed; you’ll find all of the data you’re looking for there.Where can I find the “Link Header”? in the response Header? @jeffknupp