jOOQ icon indicating copy to clipboard operation
jOOQ copied to clipboard

Add Named.rename(Name)

Open lukaseder opened this issue 3 years ago • 0 comments

All Named subtypes should offer API that allows for creating a new instance of the same object under a different name. So far, we have generated Table.rename(Name) methods that allow for doing this with generated tables. But we could use this everywhere. Existing use-cases:

  • A feature request to pull this up to Table: https://github.com/jOOQ/jOOQ/issues/5242
  • A feature request to offer similar functionality on Schema: https://github.com/jOOQ/jOOQ/issues/11556
  • A use-case to rename Field types in order to influence formatJSON() output: https://github.com/jOOQ/jOOQ/issues/13870#issuecomment-1231854722

By pulling up the method to Named, we can single handedly offer the functionality to:

  • [ ] Catalog
  • [ ] Schema
  • [ ] Table
  • [ ] Field
  • [ ] DataType
  • [ ] Check
  • [ ] Key
  • [ ] Constraint
  • [ ] Index
  • [ ] Label
  • [ ] Parameter
  • [ ] Period
  • [ ] Role
  • [ ] User
  • [ ] Domain
  • [ ] Package
  • [ ] Routine
  • [ ] Sequence
  • [ ] UDT

lukaseder avatar Aug 31 '22 06:08 lukaseder