Skip to content

What is Expression.Placeholder suppose to mean #87

Description

@leqwasd

What is Expression.Placeholder suppose to mean?

This is what I get, when I parse a query, and inspect only Selection

For query SELECT * FROM X WHERE ABC = @myparam I get:
BinaryOp { Left = Identifier { Ident = ABC }, Op = Eq, Right = Identifier { Ident = @myparam }, PgOptions = }

For query SELECT * FROM X WHERE ABC = :myparam I get:
BinaryOp { Left = Identifier { Ident = ABC }, Op = Eq, Right = LiteralValue { Value = Placeholder { Value = :myparam } }, PgOptions = }

In Oracle - you bind parameters using :param, in Postgres, you bind parameters using @param.
But in "oracle" query - I get Placeholder, but in "postgres" query I get just Identifier.

Question - is Placeholder suppose to be a parameter? If so - why doesn't it parse @params as them (since you support Postgres)
Or
is it something else that I am not familiar with.
Or
this parser is not treating bind parameters differently at all (hence - Identifier in "postgres" query) and Placeholder - is semantically meant to be a totally different thing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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