Skip to content

[DOCS]: Index creation docs unclear #3851

Description

@baronyoung

Enhancement hasn't been filed before.

  • I have verified this enhancement I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The docs here are unclear. If I use the syntax first described, I get a 'deprecated' warning. The second description below, which it states it the new syntax, does not include what should surround it (obviously these lines should not be on the top level).

// with on()
index('name')
  .on(table.column1.asc(), table.column2.nullsFirst(), ...) or .onOnly(table.column1.desc().nullsLast(), table.column2, ...)
  .concurrently()
  .where(sql``)
  .with({ fillfactor: '70' })
// with using()
index('name')
  .using('btree', table.column1.asc(), sql`lower(${table.column2})`, table.column1.op('text_ops'))
  .where(sql``) // sql expression
  .with({ fillfactor: '70' })

I'm going with the deprecated version for now as I don't know how to use the new format based on the current docs. If anyone knows how this should be done I'd greatly appreciate the help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentationdocs/incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions