DapperLib / DapperLib/Dapper.Contrib

Snowflake query parameters syntax is not supported

Open
#154 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
293
Forks
109
PR merge metrics
No merged PRs in 30d

Description

In Snowflake, query parameters do not start with @.
They either start with : or are anonymous (?).
Dapper supports it (there is even Dapper.SqlMapper.Settings.UseIncrementalPseudoPositionalParameterNames setting).

However, Dapper.Contribs' Get() method has @ hardcoded, which causes Snowflake error like SQL compilation error: syntax error line 1 at position 45 unexpected '@id'.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Dapper.Contribs Get() method, where the issue reports that the @ parameter syntax is hardcoded, and compare it with Dapper.SqlMapper.Settings.UseIncrementalPseudoPositionalParameterNames. Verify the generated query parameter syntax against Snowflake's accepted : or ? forms; done means Get() no longer produces the reported Snowflake compilation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.