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

Make view columns optional in create view like #4827 #4829

Conversation

bakasmarius
Copy link
Contributor

Copy link
Collaborator

@OlivierCavadenti OlivierCavadenti left a comment

Choose a reason for hiding this comment

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

Thanks ! Can you make unit tests + integration tests with the creation of views without columns ?

@OlivierCavadenti
Copy link
Collaborator

OlivierCavadenti commented Nov 16, 2021

MSSQL have specific implementation in myssql-viewcompiler.js, line 14, you need to modify the columns construction too.
By the way, I check and columnize_ accept array too, so you just need to make that:

const columnList = columns
  ? '(' +
    columnize_(
      columns,
      this.builder,
      this.client,
      this.bindingsHolder
    ) +
    ')'
  : '';

@OlivierCavadenti OlivierCavadenti merged commit 44dbbca into knex:master Nov 16, 2021
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.

Make view.columns() functionality optional when creating a view
2 participants