This repository has been archived by the owner on May 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 218
Problemas com o postgres #12
Open
aweiand
wants to merge
45
commits into
gilbitron:master
Choose a base branch
from
alixaxel:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-urlencoded; charset=utf-8 Did a string comparison on the string before the first ;.
fix when content-type header contains encoding
Allows for global modification of a particular type of response
This reverts commit 9161519.
Moving all responses to a single location
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tive alguns problemas com a base postgre, para os quais fiz as seguintes alterações para que funcionasse sem problemas:
Alterações para aperfeiçoamento do postgre:
Adicionado teste de "is_numeric($data)" na linha 72 para poder trabalhar melhor com colunas que sejam inteiras e não utilizar "LIKE" no "WHERE"
Removidas as aspas "´" e "`" para funcionamento correto
Suprimida a opção "PDO::ATTR_AUTOCOMMIT => true" na linha 573 para correção de bug na conexão do PDO
As alterações que efetuei:
Adicionado teste de tipo para verificar se for inteiro e poder utilizar campos com nomes diferentes de id no get, sem prejuízos a consulta no postgresql
if (is_numeric($data))
$query[] = sprintf('WHERE %s = ?', $id);
else
$query[] = sprintf('WHERE %s LIKE ?', $id);
Bug na Classe/Driver que não permite trocar o tipo de autocommit
$options += array
(
\PDO::ATTR_AUTOCOMMIT => true,
);