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

OrderBy RANDOM(), Column selection, IEnumerable.Select handling in Where Expression, ... #319

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

alexis-
Copy link

@alexis- alexis- commented Aug 9, 2016

  • Added OrderByRand() method to TableQuery (SQLite RANDOM() function)
  • Added SelectColumns methods to TableQuery for usage in specifically selecting columns and arbitrary commands in SELECT statement
    • SelectColumns(params string[] propertiesName) which automatically generate SELECT statement with provided properties -> column name
    • SelectColumns(string selectSqlStatement, params string[] propertiesName) which allows specifying custom SELECT statement [e.g. SelectColumns(""{0}" * 2 as "DoubleValue"", "Value")]
  • Added MapTo(bool selectFromProperties) method to TableQuery which allows mapping results to a custom class
  • Added IEnumerable.Select case handling to TableQuery::CompileExpr in ExpressionType.Call if block which allows unfolding values in Where Expression
  • Added GetTableName(TypeInfo t) to IColumnInformationProvider -- TableAttribute was not proxied through the provider, perhaps this is on purpose, or a simple omission ?
  • Added broader "Constraint" detailed error result handling
  • Added tests for above features
  • Changed several of TableQuery's fields accessibility to protected, which allows derived class to custimize behavior (in my case, this was needed to create a bridge class for usage in generic Database providers)

Alexis added 4 commits August 9, 2016 16:53
- Added SelectColumns option for usage in specifically selecting columns and arbitrary commands in SELECT statement
- Added IEnumerable.Select case handling in Where Expression
- Added broader "Constraint" detailed error result handling
- Added tests for above features
- Changed several of TableQuery's fields accessibility to protected
…ack to *.cs )

- Fixed AppVeyor compile error
- Fixed CollectionAssert error
- Added GetTableName to IColumnInformationProvider -- TableAttribute was not proxied through the provider, is this on purpose or a simple omission ?
…sure how to check for errors before pushing changes. Hope I haven't missed anything.
- Renamed MapTo type parameter to a more meaningful denomination
@alexis-
Copy link
Author

alexis- commented Sep 16, 2016

Just wondering, would this make it easier for you if I made separate PR for the different features ?

I don't mind putting some extra work or even lending a hand if this could help toward the new version.
Also, any thought on next nuGet package release ?

Many thanks for the hard work.
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant