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

Allow attach/detach db to IModelDb connection #7530

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

khanaffan
Copy link
Contributor

@khanaffan khanaffan commented Jan 8, 2025

imodel-native: iTwin/imodel-native#956

Allow attach/detach db to active connection. This allow to combine data from more then on db using ECSQL.

@khanaffan khanaffan marked this pull request as ready for review January 9, 2025 19:30
@khanaffan khanaffan requested a review from a team as a code owner January 9, 2025 19:30
@khanaffan khanaffan requested a review from a team as a code owner February 20, 2025 16:49
/**
* Attach a ECDb file to this connection and load and register its schemas.
* @param fileName ECDb file name
* @param alias identifier for the attached file. This identifer is used a tablespace executing ECSQL queries.
Copy link
Member

Choose a reason for hiding this comment

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

I don't know what "a tablespace" is supposed to mean. Maybe you meant "as tablespace", but I don't recognize the term "tablespace". I know what this parameter does, but I don't know the proper way to describe it.

@@ -618,7 +618,7 @@ Allow to attach a ECDb/IModel to connection and run ECSQL that combines data fro

Example of attaching a snapshot to a master file and running a query that combines data from both databases:
```ts
const master = SnapshotDb.openFile(masterFile);
const master = SnapshotDb.openFile(masterFile);
Copy link
Member

Choose a reason for hiding this comment

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

Sorry; looks like the other lines are three-space indented, while my suggested change was 4. I think the indent for all lines should be either 4 spaces or 2, but I'm not sure which is better.

Copy link
Member

Choose a reason for hiding this comment

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

Never mind; looks like my suggested change somehow had 5 spaces, so just fix that.

/**
* Attach a iModel file to this connection and load and register its schemas.
* @param fileName IModel file name
* @param alias identifier for the attached file. This identifer is used a tablespace executing ECSQL queries.
Copy link
Member

Choose a reason for hiding this comment

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

Same as for ECDb regarding "a tablespace".

Copy link
Member

@tcobbs-bentley tcobbs-bentley left a comment

Choose a reason for hiding this comment

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

I didn't fully understand the ECDb.test.ts changes, but everything else looks good.

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.

3 participants