-
Notifications
You must be signed in to change notification settings - Fork 443
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
Add RedshiftAdapter #496
base: master
Are you sure you want to change the base?
Add RedshiftAdapter #496
Conversation
Is it possible to add tests for this? |
If you make the Also, your classfile uses spaces for indentation, where all other are using tabs. |
@koenpunt Yes, I wanted to do in the beginning, but https://github.com/jpfuentes2/php-activerecord/blob/master/lib/Connection.php#L132-L140 you do not use Connection of adapters through the namespace and I get the error 'PHP Fatal error: Class 'ActiveRecord\PgsqlAdapter' not found in' if remodel Connection of, reverse compatibility, and will need quite a lot to refactor. If it makes sense to do. @jpfuentes2 Aws Redshift is an internal service of the Amazon, and without an account can not get there. If you can run tests on the old version Postrges sql <= 8.0.2, I do. |
If you require the require_once __DIR__ . '/PgsqlAdapter.php'; |
…remove extra methods from RedshiftAdapter
@@ -395,7 +395,7 @@ private function get_meta_data() | |||
{ | |||
// as more adapters are added probably want to do this a better way | |||
// than using instanceof but gud enuff for now | |||
$quote_name = !($this->conn instanceof PgsqlAdapter); | |||
$quote_name = !($this->conn instanceof PgsqlAdapter || $this->conn instanceof RedshiftAdapter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that RedshiftAdapter
extends PgsqlAdapter
, $this->conn instanceof PgsqlAdapter
would be sufficient here
…Adapter) -> !(->conn instanceof PgsqlAdapter)
Accept? |
To get this running on aws, I'll have to setup an ec2 and redshift instance? Or can it run standalone as well? |
Only redshift instance, and I am currently using this adapter. Сonnection redshift://user:pass@host:port/base as to any of your adapter. |
Why not add the instructions now and merge then refactor the test setup afterwards? Couldn't we ignore the adapter by default unless given a specific command? |
The adapter is ignored by default (afaik), because it's not included in the |
Ah, then should we still block this if @gronpipmaster adds some instructions? |
Add support aws redshift