Skip to content

Add overload of createIndex that takes an array instead of variadic parameters #1322

@bbrk24

Description

@bbrk24

Currently, the Table.createIndex method only has one overload:

public func createIndex(_ columns: Expressible..., unique: Bool = false, ifNotExists: Bool = false) -> String

It would be nice to have a second overload like

public func createIndex(_ columns: [Expressible], unique: Bool = false, ifNotExists: Bool = false) -> String

so that it becomes possible to wrap it in a helper function that can take an arbitrary number of columns in its parameters. Currently, there's no way to forward variadic arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions