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

Add milestoning setup in Query Option #3230

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

irisyngao
Copy link
Contributor

@irisyngao irisyngao commented Jun 7, 2024

Summary

This PR is improved on top of #3148

Screen.Recording.2024-06-11.at.9.52.20.AM.mov
Screen.Recording.2024-06-11.at.9.51.54.AM.mov

model:

###Relational
Database my::db
(
  Table PersonTable
  (
    NAME CHAR(200) PRIMARY KEY,
    FIRMID INTEGER
  )
  Table PersonTable1
  (
    NAME CHAR(200) PRIMARY KEY,
    FIRMID INTEGER
  )
  Table PersonTable2
  (
    NAME CHAR(200) PRIMARY KEY,
    FIRMID INTEGER
  )
  Table FirmTable
  (
    FIRMNAME CHAR(200) PRIMARY KEY,
    ID INTEGER
  )

  Join Firm_Person(PersonTable.FIRMID = FirmTable.ID)
  Join Person_Person1(PersonTable.FIRMID = PersonTable1.FIRMID)
  Join Person_Person2(PersonTable.FIRMID = PersonTable2.FIRMID)
  Join Person1_Person2(PersonTable1.FIRMID = PersonTable2.FIRMID)
)


###Pure
Class <<temporal.businesstemporal>> my::Person
{
  name: String[1];
  firmID: Integer[1];
  date: DateTime[1];
  processingTemporal: my::Person2[1];
  businessTemporal: my::Person[1];
  biTemporal: my::Person1[1];
}

Class <<temporal.processingtemporal>> my::Person2
{
  name: String[1];
  firmID: Integer[1];
  processingTemporal: my::Person2[1];
  biTemporal: my::Person1[1];
  businessTemporal: my::Person[1];
}

Class <<temporal.bitemporal>> my::Person1
{
  name: String[1];
  firmID: Integer[1];
  businessTemporal: my::Person[1];
  processingTemporal: my::Person2[1];
  biTemporal: my::Person1[1];
  prop(d: String[1]) {$this.name}: String[1];
}

Class my::Firm
{
  legalName: String[1];
  firmID: Integer[1];
  businessTemporal: my::Person[1];
  biTemporal: my::Person1[1];
  processingTemporal: my::Person2[1];
}


###Mapping
Mapping my::map
(
  *my::Person: Relational
  {
    ~primaryKey
    (
      [my::db]PersonTable.NAME
    )
    ~mainTable [my::db]PersonTable
    processingTemporal[my_Person2]: [my::db]@Person_Person2,
    firmID: 100,
    biTemporal[my_Person1]: [my::db]@Person_Person1,
    businessTemporal[my_Person]: [my::db]@Person_Person1,
    date: 2021
  }
  *my::Person1: Relational
  {
    ~primaryKey
    (
      [my::db]PersonTable1.NAME
    )
    ~mainTable [my::db]PersonTable1
    businessTemporal[my_Person]: [my::db]@Person_Person1,
    processingTemporal[my_Person2]: [my::db]@Person1_Person2,
    firmID: 101,
    biTemporal[my_Person1]: [my::db]@Person_Person1
  }
  *my::Person2: Relational
  {
    ~primaryKey
    (
      [my::db]PersonTable2.NAME
    )
    ~mainTable [my::db]PersonTable2
    biTemporal[my_Person1]: [my::db]@Person1_Person2,
    businessTemporal[my_Person]: [my::db]@Person_Person2,
    firmID: 101,
    processingTemporal[my_Person2]: [my::db]@Person_Person2
  }
  *my::Firm: Relational
  {
    ~primaryKey
    (
      [my::db]FirmTable.FIRMNAME
    )
    ~mainTable [my::db]FirmTable
    businessTemporal[my_Person]: [my::db]FirmTable.FIRMNAME,
    biTemporal[my_Person1]: [my::db]FirmTable.FIRMNAME,
    processingTemporal[my_Person2]: [my::db]FirmTable.FIRMNAME,
    firmID: [my::db]FirmTable.ID
  }
)


###Runtime
Runtime my::runtime
{
  mappings:
  [
    my::map
  ];
}

How did you test this change?

  • Test(s) added
  • Manual testing (please provide screenshots/recordings)
  • No testing (please provide an explanation)

@irisyngao irisyngao requested a review from a team as a code owner June 7, 2024 20:54
@irisyngao irisyngao self-assigned this Jun 7, 2024
Copy link

changeset-bot bot commented Jun 7, 2024

🦋 Changeset detected

Latest commit: f7c89ad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@finos/legend-query-builder Patch
@finos/legend-application-query-bootstrap Patch
@finos/legend-application-query Patch
@finos/legend-application-studio Patch
@finos/legend-extension-dsl-data-space-studio Patch
@finos/legend-extension-dsl-data-space Patch
@finos/legend-extension-dsl-service Patch
@finos/legend-application-query-deployment Patch
@finos/legend-application-studio-bootstrap Patch
@finos/legend-extension-assortment Patch
@finos/legend-extension-dsl-diagram Patch
@finos/legend-extension-dsl-persistence Patch
@finos/legend-extension-dsl-text Patch
@finos/legend-extension-store-flat-data Patch
@finos/legend-extension-store-relational Patch
@finos/legend-extension-store-service-store Patch
@finos/legend-application-studio-deployment Patch
@finos/legend-application-pure-ide Patch
@finos/legend-application-pure-ide-deployment Patch
@finos/legend-application-repl-deployment Patch
@finos/legend-server-showcase-deployment Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@irisyngao irisyngao marked this pull request as draft June 7, 2024 20:55
Copy link

codecov bot commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 76.71894% with 193 lines in your changes missing coverage. Please review.

Project coverage is 47.94%. Comparing base (dbba035) to head (f7c89ad).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3230      +/-   ##
==========================================
- Coverage   48.07%   47.94%   -0.14%     
==========================================
  Files        1997     1997              
  Lines      338983   339381     +398     
  Branches    14942    14596     -346     
==========================================
- Hits       162961   162705     -256     
- Misses     175213   175986     +773     
+ Partials      809      690     -119     
Files Coverage Δ
...ery-builder/src/components/QueryBuilderSideBar.tsx 89.88% <ø> (-0.50%) ⬇️
...stores/fetch-structure/tds/QueryBuilderTDSState.ts 79.06% <100.00%> (+0.38%) ⬆️
...s/projection/QueryBuilderProjectionStateBuilder.ts 99.21% <100.00%> (+<0.01%) ⬆️
...rc/stores/filter/QueryBuilderFilterStateBuilder.ts 59.60% <100.00%> (+0.10%) ⬆️
...lestoning/QueryBuilderMilestoningImplementation.ts 100.00% <100.00%> (ø)
...src/stores/QueryBuilderValueSpecificationHelper.ts 84.73% <66.66%> (-0.13%) ⬇️
...uilderBusinessTemporalMilestoningImplementation.ts 86.89% <84.61%> (-0.23%) ⬇️
...lderProcessingTemporalMilestoningImplementation.ts 86.86% <84.61%> (+0.57%) ⬆️
...stores/milestoning/QueryBuilderMilestoningState.ts 74.45% <78.04%> (-10.78%) ⬇️
...QueryBuilderBitemporalMilestoningImplementation.ts 72.76% <21.73%> (-6.18%) ⬇️
... and 4 more

... and 242 files with indirect coverage changes

@irisyngao irisyngao force-pushed the queryOption branch 4 times, most recently from 5e6073b to 68015b4 Compare June 10, 2024 20:05
@irisyngao irisyngao changed the title WIP: Add milestoning setup in Query Option Add milestoning setup in Query Option Jun 10, 2024
@irisyngao irisyngao marked this pull request as ready for review June 10, 2024 20:05
@irisyngao irisyngao marked this pull request as draft June 10, 2024 20:29
@irisyngao irisyngao marked this pull request as ready for review June 10, 2024 21:56
@irisyngao irisyngao force-pushed the queryOption branch 4 times, most recently from d0864b6 to 0c93869 Compare June 14, 2024 02:35
@MauricioUyaguari MauricioUyaguari merged commit da4fc7b into finos:master Jun 18, 2024
14 checks passed
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.

2 participants