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

[FEATURE]: get[Materialized]ViewName, ie getTableName but for (materialized) views. #3946

Open
1 task done
carloschida opened this issue Jan 14, 2025 · 0 comments · May be fixed by #3947
Open
1 task done

[FEATURE]: get[Materialized]ViewName, ie getTableName but for (materialized) views. #3946

carloschida opened this issue Jan 14, 2025 · 0 comments · May be fixed by #3947
Labels
enhancement New feature or request

Comments

@carloschida
Copy link

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

drizzle-orm: v0.38.2

With the amazing introduction of views, my team and I have started using them heavily.

I find my self doing this:

try {
  await db.refreshMaterializedView(aMaterializedView);
} catch (err: unknown) {
  const error = new Error("Could not refresh materialized view", { cause: err });
  console.warn(error)
}

Nonetheless, I'd like the error message to be more descriptive, ie include the view name.
I tried with getTableName but the type $inferInsert is naturally missing in the materialized view.

Is this something easy to implement?
I'm a heavy fan and user of drizzle but have never contributed to the code.
If someone could point me exactly to where I should write this function, I could try to follow from context.

@carloschida carloschida added the enhancement New feature or request label Jan 14, 2025
@carloschida carloschida linked a pull request Jan 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant