Skip to content

Indices in javascript schema #2

@oskr

Description

@oskr

Hello, Is there any way to create indices in the javascript schema?
This feature is documented only with decorators but I tried

module.exports = {
    name: "Category",
    columns: {
        id: {
            primary: true,
            type: "int",
        },
        name: {
            index: true,
            type: "string"
        }
    }
};

Also tried

...
name:{
       index:{
             name: "INAME"
       }
}
...

or with the property indices in the root schema:

...
name: "Category",
indices:[
         {
              name: "INAME",
              columns: ["name"]
         }
]
...

Is this feature supported on javascript schemas or only for typescript using decorators?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions