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

Linked data #47

Conversation

OneFishTwoFishRedFish-JFish
Copy link
Contributor

What kind of change does this PR introduce?

Feature

What is the current behavior?

Pages with data that have a foreign key can't display the related data

What is the new behavior?

There's a new Attribute Type so that you can define the foreign key related data and display in a dropdown.

Additional context

Is this what you had in mind for Issue #18 ?
I can think of other features to add like including an option query parameter for defining other constraints.
Also, please note the naming - I'm open to changing any of it.

@OneFishTwoFishRedFish-JFish
Copy link
Contributor Author

OneFishTwoFishRedFish-JFish commented Jun 9, 2022

I didn't include an example in the commit, but this is what a page with the linked data looks like in the dashibaseConfig

{
name: "Team",
page_id: "team",
table_id: "Team",
id_col: "TeamId",
//user_col: "Owner",
enforce_user_col: false,
mode: "list",
attributes: [
{
// Enum example - this will generate a dropdown with the provided options
id: "Name",
label: "Name",
required: false,
readonly: false,
type: AttributeType.Text,
//enumOptions: ['foo', 'bar'], // Specify enum options
} as Attribute,
{
// Linked Page example
id: "LeagueId",
label: "League",
required: false,
readonly: false,
type: AttributeType.PageX,
linkedPage: {
name: 'league',
id_col: 'LeagueId',
value_col: 'Name',
} as LinkedPage
} as Attribute,
]
},

@greentfrapp greentfrapp self-assigned this Jun 9, 2022
@greentfrapp greentfrapp self-requested a review June 9, 2022 03:06
@greentfrapp
Copy link
Contributor

Wow nice! Thanks @OneFishTwoFishRedFish-JFish - I might take a while to review this because I'm working on a related issue as well. Will get back to you by Friday night, please bump this thread if I don't.

But in the meantime, I'll absolutely love to set up some time to chat - if you're up for a call, could you send an email to sk@dashibase.com?

@OneFishTwoFishRedFish-JFish
Copy link
Contributor Author

cool! we've got a meeting set up at 9:30am CST tomorrow :)

@greentfrapp
Copy link
Contributor

Ah that's you! Got it - see you then!

@OneFishTwoFishRedFish-JFish
Copy link
Contributor Author

Would like to close this PR, the latest JOIN commit accomplishes this plus a whole lot more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants