Skip to content

Conversation

@baileydunning
Copy link
Member

Give code example for accessing tables in Harper resources

Copy link
Member

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

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

This looks good to me. I think the 4.5 page needs fixing. Looks like only partially copied. All the others look good.

#### Example

```js
const MyTable = tables.table_name; // Same as databases.data.MyTable
Copy link
Member

Choose a reason for hiding this comment

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

tables === databases.data, but table_name !== MyTable !== Product. Throughout this, I am not sure if we are trying to stick to Product, MyTable, or table_name.


### `tables`

This is an object with all the tables in the default database (the default database is "data"). Each table that has been declared or created will be available as a (standard) property on this object, and the value will be the table class that can be used to interact with that table. The table classes implement the Resource API.
Copy link
Member

Choose a reason for hiding this comment

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

If we are going to add this, I wonder if it should be at line 58 before we first reference tables.MyTable?

Copy link
Member

Choose a reason for hiding this comment

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

I just realized we have two "Globals" references in the docs. The top-level page and then this subsection. TBH i don't think we need to tackle reorganization within this pr. Just updating the sections in place with more details is helpful enough and then we'll make larger organization and flow changes later.

Copy link
Member

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

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

Almost there. after making these edits please copy and paste to the version directories as necessary.

Copy link
Member

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@kriszyp kriszyp left a comment

Choose a reason for hiding this comment

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

These are helpful examples, thank for you putting this together.

Copy link
Member

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

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

We tested the code and its running as expected. This LGTM :shipit:

@baileydunning baileydunning merged commit d0747bf into main Nov 25, 2025
5 checks passed
@baileydunning baileydunning deleted the resource-update branch November 25, 2025 17:47
@Ethan-Arrowood
Copy link
Member

didn't mean to merge without your review @kriszyp ! Miscommunication on my part. If you notice anything else out of place please follow up and we can push a fix immediately.

@kriszyp
Copy link
Member

kriszyp commented Nov 25, 2025

No problem, glad it is merged, great work!

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.

4 participants