Skip to content

namedPlaceholders only works for values, not for MySQL identifiers #4352

Description

@aaloman

Are there any MySQL identifiers like below like ::column and ::direction

const [rows] = await connection.query(
   `SELECT * FROM users
    WHERE id = :id
    AND status = :status
    ORDER BY ::column :direction`,
    { id: 14, status: 'active', column: 'username', direction: 'ASC' }
)

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