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

Welcome to QueryBuilderProvider! #29

Merged
merged 5 commits into from
Mar 2, 2016
Merged

Conversation

timgws
Copy link
Member

@timgws timgws commented Mar 2, 2016

I have a present for all of you <3

This implements Feature Request #19 and #5

// Don't do anything, this is not a searchable field
return $this->query;
} elseif ($searchType == DefaultSearchable::NORMAL()) {
$this->query->orWhere($column->getName(), 'LIKE', '%' . $searchValue . '%');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember having problems with postgresql users that wanted to use iLIKE in their queries.

Should we consider that or providing the option to override any column query?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already really have the option to override any column query with the Searchable types, so we just need to add one for case insensitive as another option.

The only thing is that then that the QueryBuilderProvider would need to know what database it is running on so that we can build the correct query depending on wether the database is MySQL or Postgres.

Maybe adding ->isPostgres and ->isMySQL as functions on this class might not be a bad idea? Then at least we can throw errors if we can't build the correct query for a db...

Either way, I am not really worried about this until someone opens a bug or feature request :)

@Chumper
Copy link
Contributor

Chumper commented Mar 2, 2016

Seems fair enough to wait for anyone complaining :)

timgws added a commit that referenced this pull request Mar 2, 2016
Welcome to QueryBuilderProvider!
@timgws timgws merged commit 18b88ee into OpenSkill:master Mar 2, 2016
@timgws timgws deleted the add-querybuilder branch February 6, 2017 02:29
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.

2 participants