Skip to content

augment arc.tables to lazily load index schema(s) #370

@reconbot

Description

@reconbot

I want to have some sort of runtime validation for my use of indexes. I can do a describe table but I think arc/functions might be an interesting place to do the discovery like it does for tables.

The index name and fields would be nice.

const tables = await arc.tables()
const tableName = tables.name('users')
const indexes = tables.indexes('users)
// { "email-index": { hash: 'email', sort: 'createdAt' } }

I'm not sure I nailed the result object but it's close.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions