datagrok-ai / public

Public package repository for the Datagrok.ai platform
MIT License
45 stars 26 forks source link

#198: tableView: Documentation does not match the implementation #198

Open nikolay-alemasov opened 2 years ago

nikolay-alemasov commented 2 years ago

datagrok-api/src/shell.ts:234 says that the tableView returns null if there is no view with the name specified:

  /** Returns a first TableView for the specified [tableName], or null if there
   *  are no such views. */
  tableView(tableName: string): TableView {
    return this.getTableView(tableName);
  }

while datagrok-api/src/shell.ts:192 states that getTableView opens a new view if necessary:

/**
   * Returns {@link TableView} for the specified table if it exists, opens a new view if necessary.
   * Search is case-insensitive.
   * @param {string} tableName
   * @returns {TableView} */
  //Obsolete
  getTableView(tableName: string): TableView {
    return new TableView(api.grok_GetTableView(tableName));
  }

So it seems that there is no case when tableView returns null.

skalkin commented 2 years ago

Thanks - feel free to adjust the implementation!

On Mon, Nov 15, 2021 at 12:09 AM nikolay-alemasov @.***> wrote:

Assigned #198 https://github.com/datagrok-ai/public/issues/198 to @skalkin https://github.com/skalkin.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/datagrok-ai/public/issues/198#event-5615690473, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHGKK3DCLARR4NYJMWY7GTUMCIW3ANCNFSM5IAZFBDQ .

skalkin commented 2 years ago

I meant, adjust the documentation :)

On Mon, Nov 15, 2021 at 3:14 PM Andrew Skalkin @.***> wrote:

Thanks - feel free to adjust the implementation!

On Mon, Nov 15, 2021 at 12:09 AM nikolay-alemasov < @.***> wrote:

Assigned #198 https://github.com/datagrok-ai/public/issues/198 to @skalkin https://github.com/skalkin.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/datagrok-ai/public/issues/198#event-5615690473, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHGKK3DCLARR4NYJMWY7GTUMCIW3ANCNFSM5IAZFBDQ .

dnillovna commented 8 months ago

This issue has been mirrored in Jira: https://reddata.atlassian.net/browse/GROK-14768

dnillovna commented 3 months ago

This issue has been mirrored in Jira: https://reddata.atlassian.net/browse/GROK-16031