RelationsUtils
@quik/database / RelationsUtils
Variable: RelationsUtils
constRelationsUtils:object
Defined in: database/src/repository/index.ts:26
Utility functions for working with relations. Provides methods for converting between different relation formats.
Type Declaration
fromList
fromList: (
relationsList) =>QFindRelations
Converts a flat list of relation paths into the nested format expected by query builders.
A relation such as "posts.comments" is transformed into the object
{ posts: ['comments'] } so that nested joins can be generated correctly.
Parameters
relationsList?
string[] = []
Flat list of relations, defaults to an empty array