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

Handle IEnumerable<int> parameter #225

Merged
merged 2 commits into from May 8, 2014

Conversation

Projects
None yet
2 participants
@danzel
Copy link
Contributor

danzel commented May 4, 2014

WriteEnumeration would use Square braces instead of Curly braces, in comparison WriteArray always uses Curly braces.
I've changed WriteEnumeration to always use Curly to match.

Not 100% sure if this is the right fix, but works for this case. I've added a test.
Fixes #222

@franciscojunior

This comment has been minimized.

Copy link
Member

franciscojunior commented May 4, 2014

Thanks for your patch, @danzel !

@glenebob , can you please check if it is ok? It seems brackets are being used when not using prepared statements which is giving errors. Maybe those brackets were there to be used with array constructor syntax? http://www.postgresql.org/docs/9.1/static/sql-expressions.html#SQL-SYNTAX-ARRAY-CONSTRUCTORS

@franciscojunior

This comment has been minimized.

Copy link
Member

franciscojunior commented May 8, 2014

After checking the documentation, http://www.postgresql.org/docs/8.4/static/arrays.html the bracket notation is only used when the string ARRAY is written before the array. i.e.: (from postgresql documentation)

INSERT INTO sal_emp
    VALUES ('Bill',
    ARRAY[10000, 10000, 10000, 10000],
    ARRAY[['meeting', 'lunch'], ['training', 'presentation']]);

I think this notation format was left there by mistake because we used to use this notation but we don't use it anymore.

I conclude then that the fix proposed is correct. Merging now...

While doing the tests, I noticed another bug in Npgsql with prepared statements and IEnumerable

@franciscojunior franciscojunior added this to the 2.2 milestone May 8, 2014

franciscojunior added a commit that referenced this pull request May 8, 2014

Merge pull request #225 from danzel/fix-222
Handle IEnumerable<int> parameter

@franciscojunior franciscojunior merged commit fe7fba2 into npgsql:master May 8, 2014

1 check passed

default Finished TeamCity Build Npgsql :: All : Running
Details

roji added a commit to roji/Npgsql that referenced this pull request Apr 12, 2019

Completely ignore DbCommand.Transaction
PostgreSQL only supports a single transaction on a given connection at
a given time; as a result, Npgsql largely ignores DbCommand.Transaction.
This commit removes some useless partial checks.

Also disable related specification tests (part of npgsql#225).

roji added a commit that referenced this pull request Apr 14, 2019

Completely ignore DbCommand.Transaction
PostgreSQL only supports a single transaction on a given connection at
a given time; as a result, Npgsql largely ignores DbCommand.Transaction.
This commit removes some useless partial checks.

Also disable related specification tests (part of #225).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.