Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 add IRelatedRelation Type document #63

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 11 additions & 22 deletions pages/src/api/types/schema/model/IRelatedRelation.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,27 @@
# IRelatedRelation


```ts
export interface IRelatedRelation {
/**
* name of schema that this schema has relation with
*/
schemaName: string;
/**
* name of the main relation related to this relation
*/
mainRelationName: string;
/**
* type of the main relation related to this relation
*/
mainRelationType: RelationDataType;
/**
* type of relation if equal to one: this schema record one object from other schema else
* this schema record array of object from other schema
*/
type: RelationDataType;
/**
* number of value that we want to keep
*/
limit?: null | number;
/**
* sort : {field , order} - field of sort , and order of sort
*/
sort?: {
field: string;
order: "asc" | "desc";
};
}
```

the `IRelatedRelation` type has the following type :
- [`RelationDataType`](./TRelation/RelationDataType.md)
_if schema has relation with other schema and in SQL that we dont keep foriegn key._
<br>

_store in OutRelation feature and usually the number of it greater thant of 50_

<h3>Types</h3>
<pre>
<code class="language-ts" style="padding: 0; margin-top: 12px; margin-top: -18px;">
<a href="./TRelation/RelationDataType.md" target="_blank" style="text-decoration: none; cursor:pointer">RelationDataType</a>
</code>
</pre>
Loading