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

enhancement(jpa): add json type #2211

Merged
merged 3 commits into from
Apr 22, 2024
Merged

Conversation

ungreat
Copy link
Collaborator

@ungreat ungreat commented Apr 15, 2024

What type of PR is this?

add json type.

eg.
First at all, you have to def custom type .

@TypeDefs({@TypeDef(name = "Json", typeClass = JsonType.class)})
@Entity
public class Example {
}

Then annotate filed

  @Type(type = "Json")
  private ExampleObject example;

The example filed will persisted as a string type, such as varchar.

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:


@yhilmare yhilmare added the enhancement New feature or request label Apr 15, 2024
@yhilmare yhilmare added this to the ODC 4.2.4-bp2 milestone Apr 15, 2024
@ungreat ungreat changed the title enhancement(jpa): add json type WIP:enhancement(jpa): add json type Apr 15, 2024
@yhilmare yhilmare changed the title WIP:enhancement(jpa): add json type [WIP] enhancement(jpa): add json type Apr 16, 2024
@yhilmare yhilmare marked this pull request as draft April 16, 2024 11:38
@yizhouxw
Copy link
Contributor

may same feature as Conveter:
image

@ungreat
Copy link
Collaborator Author

ungreat commented Apr 18, 2024

may same feature as Conveter: image

A fairly obvious advantage is that, by using JsonType, the type required for deserialization can be dynamically obtained based on the type of the field currently being annotated.

@ungreat ungreat changed the title [WIP] enhancement(jpa): add json type enhancement(jpa): add json type Apr 18, 2024
@ungreat ungreat marked this pull request as ready for review April 19, 2024 03:35
Copy link
Contributor

@yizhouxw yizhouxw left a comment

Choose a reason for hiding this comment

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

awesome generic json column solution!

@yizhouxw yizhouxw merged commit 4f55c3c into dev/4.2.x Apr 22, 2024
11 checks passed
@yizhouxw yizhouxw deleted the yiang_42x_add_jpa_json_type branch April 22, 2024 07:07
zijiacj pushed a commit that referenced this pull request May 13, 2024
* add json type

* remove package-info

* add integrate test
yhilmare pushed a commit that referenced this pull request May 20, 2024
…e databases change (#2275)

* complete the controller and dao layers

* complete the controller and dao layers

* Complete the code for the template section

* create multiple database change flowinstance

* Added View the details of  multiple database  change flowinstance

* modify code format

* Change the version number to avoid duplication

* add sql check,task log and synchronization of the tasks' progress

* modify code format

* Delete obsolete files

* implement the servic of multiple databases change template

* implement the paging query and multiple databases sqlcheck

* implement the paging query and multiple databases sqlcheck

* Added the duplicate name verification interface and unit test of the template

* modify code format

* builds: fix failed to install pnpm (#2248)

* fix: set pnpm version to v8

* fix: set pnpm version to v8

* Remove redundant code

* Add name for multiple database change flow instance

* modify the code format

* modify view the template list、batch access database、set the risk level and modify the code format

* Add environment objects to viewing  multi-database flow's  response and add database objects for viewing  multi-database sql check's response

* Add a single pre-check node and flow  description for multiple databases

* add the function of viewing multi-database pre-check nodes

* Refine the execution of recorded responses

* Add environment elements to multi-databases response results

* Modify code format

* Limit the number of databases and do not allow duplicate databases

* Fixed error after sql check when the input is '#'

* Solve the problem that multiple database flow cannot be initiated repeatedly

* Fixed NullPointerException  when transferring sql files

* fix execution record display when failure occurs

* modify code format

* enhancement(jpa): add json type (#2211)

* add json type

* remove package-info

* add integrate test

* Modify code format and optimize performance

* Finished ignoring error execution in automatic mode and fixed the issue of checking multiple sql displays

* fix template create and update

* Complete various strategy for creating multi-database workflow

* Reduce redundant code

* Modify the code to conform to odc specifications

* Remove redundant code

* Added a scheduled template task to fix bugs

* modify the code format

* response to cr comments

* Optimize persistence and response objects

* Remove redundant code

* Serialize the databaseList

* modify code format

* delete the redundant code

* modify the code format

* response to cr

* response to cr

---------

Co-authored-by: Xiao Kang <xxk268858@antgroup.com>
Co-authored-by: Ang <43255684+ungreat@users.noreply.github.com>
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
Status: Developed
Development

Successfully merging this pull request may close these issues.

3 participants