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

docs: EXPOSED-499 Add examples of custom data types #2213

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

bog-walk
Copy link
Member

Description

Summary of the change:
Adds a new section to 'Data Types' page with examples of how to implement different custom types.

Detailed description:

  • Why:

    • The 6 data types used as examples are very niched database-specific types or extensions, supported by only 1 database.
      Their implementation and maintenance as out-of-the-box Exposed types is very low priority given their scope of support.
    • Documentation currently does not detail how a user can customize their own column types.
  • What:

    • Adds a dedicated section under 'Data Types' for each custom type class (ltree, YEAR, int4range | daterange, SET, hstore, citext) and how to use them.
    • Ports the associated GH issues to a dedicated YT issue (see below) so they won't be forgotten (in the event supporting these types actually becomes more feasible in the future).

Type of Change

Please mark the relevant options with an "X":

  • Documentation update

Affected databases:

  • MariaDB
  • Mysql5
  • Postgres

Checklist

  • The build is green (including the Detekt check)
  • Documentation for my change is up to date

Related Issues

EXPOSED-499
EXPOSED-500

Copy link
Member

@e5l e5l left a comment

Choose a reason for hiding this comment

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

lgtm


### Ltree type

PostgreSQL provides a data type, `ltree`, to represent hierarchical tree-like data.
Copy link
Member

Choose a reason for hiding this comment

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

would be nice to have url to the postgre docs here

The following examples describe different ways to customize a column type, register a column with the custom type,
and then start using it in transactions.

### Ltree type
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest to omit "type" from the titles and use the descriptive names. So instead of "Ltree type" this would be "Hierarchical tree-like data".

Add a new section to 'Data Types' page with examples of how to implement
different custom types
- Add external reference links for each database type
- Change subsection titles to be more descriptive
@bog-walk bog-walk force-pushed the bog-walk/docs-custom-data-type branch from 891496d to 2cc8367 Compare August 26, 2024 23:51
@bog-walk bog-walk merged commit 6584eb1 into main Aug 27, 2024
3 checks passed
@bog-walk bog-walk deleted the bog-walk/docs-custom-data-type branch August 27, 2024 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants