Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indices in javascript schema #2

Closed
oskr opened this issue Mar 23, 2017 · 2 comments
Closed

Indices in javascript schema #2

oskr opened this issue Mar 23, 2017 · 2 comments

Comments

@oskr
Copy link

oskr commented Mar 23, 2017

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?

@pleerock
Copy link
Member

@iz-iznogood is this supported now?

@iz-iznogood
Copy link

Yrs it is supported. Check the EntitySchema and EntitySchemaIndex

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

No branches or pull requests

3 participants