这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@beerose
Copy link
Contributor

@beerose beerose commented May 13, 2020

Solves #4552, #4863

Description

If is_generated is set to true, editing a column is disabled in the console in Edit Row and Insert Row sections.

I also did a small refactor and moved code that was shared between EditRow and InsertRow to the separate component.

Changelog

  • CHANGELOG.md is updated with user-facing content relevant to this PR.

Affected components

  • Console

@beerose beerose added the c/console Related to console label May 13, 2020
@hasura-bot
Copy link
Contributor

Review app for commit b42cb77 deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-b42cb776

@hasura-bot
Copy link
Contributor

Review app for commit 026ac56 deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-026ac56c

@hasura-bot
Copy link
Contributor

Review app for commit 406f6c9 deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-406f6c94

@hasura-bot
Copy link
Contributor

Review app for commit 33794c0 deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-33794c0f

@hasura-bot
Copy link
Contributor

Review app for commit 3526e2b deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-3526e2b5

@netlify
Copy link

netlify bot commented Jun 11, 2020

Deploy preview for hasura-docs ready!

Built with commit 992b8a0

https://deploy-preview-4761--hasura-docs.netlify.app

@hasura-bot
Copy link
Contributor

Review app for commit 77c8048 deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-77c80486

@beerose beerose changed the title console: handle generated columns in console data section console: handle generated columns in console data section (close #4552, #4863) Jun 11, 2020
@beerose beerose changed the title console: handle generated columns in console data section (close #4552, #4863) console: handle generated and identity columns in console data section (close #4552, #4863) Jun 11, 2020
@beerose beerose marked this pull request as ready for review June 11, 2020 15:31
@beerose beerose requested review from a team as code owners June 11, 2020 15:31
Co-authored-by: Tirumarai Selvan <tirumarai.selvan@gmail.com>
Copy link
Member

@rikinsk rikinsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beerose I am seeing an error while trying to edit a row of a table which has a generated always type column. generated by default seems to work.

Table def:

CREATE TABLE people_identity_always (
    id integer primary key generated always as identity,
    name text
);

Screenshot from 2020-06-16 18-02-08

https://hge-ci-pull-4761.herokuapp.com/console/data/schema/public/tables/people_identity_always/browse

@rikinsk rikinsk assigned beerose and unassigned rikinsk Jun 16, 2020
@hasura-bot
Copy link
Contributor

Review app for commit 4ab7d65 deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-4ab7d655

@hasura-bot
Copy link
Contributor

Review app for commit a1e5cc9 deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-a1e5cc96

@beerose
Copy link
Contributor Author

beerose commented Jun 20, 2020

@rikinsk yes, I missed slight difference in the behaviour between always and by default. Should be fixed now.

@rikinsk rikinsk requested a review from soorajshankar June 23, 2020 11:47
@rikinsk rikinsk assigned soorajshankar and unassigned beerose Jun 23, 2020
Copy link
Member

@soorajshankar soorajshankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good!
left a small review comment


Tested with PG v12 locally working as expected.

@hasura-bot
Copy link
Contributor

Review app for commit d0d6dd3 deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-d0d6dd3e

@hasura-bot
Copy link
Contributor

Review app for commit 55b7d16 deployed to Heroku: https://hge-ci-pull-4761.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4761-55b7d166

@rikinsk rikinsk merged commit 53a40bc into hasura:master Jul 2, 2020
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-4761.herokuapp.com is deleted

@beerose beerose deleted the generated-columns branch July 2, 2020 09:13
stevefan1999-personal pushed a commit to stevefan1999-personal/graphql-engine that referenced this pull request Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/console Related to console

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants