This repository has been archived by the owner on Mar 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly append binds from subqueries and associations with PostgreSQL.
The issue happens if there are more than 1 bind in the SQL. Fixes #272. Generate table names correctly when joining throught an association. Fixes #302. add mysql, mysql2, postgresql adapter to specs. It should make sure that Squeel would run against all these databases consistently. Extend travis scripts to support multiple adapters.
- Loading branch information
Showing
17 changed files
with
407 additions
and
197 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,40 @@ | ||
before_script: | ||
- mysql -e "create database squeel_test_examples;" | ||
- psql -c "create database squeel_test_examples;" -U postgres | ||
|
||
script: | ||
- bundle exec rake test:$ADAPTER | ||
|
||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.1.1 | ||
- 2.1.2 | ||
|
||
env: | ||
- RAILS=master AREL=master | ||
- RAILS=4-1-stable AREL=5-0-stable | ||
- RAILS=4-0-stable AREL=4-0-stable | ||
- RAILS=3-2-stable AREL=3-0-stable | ||
- RAILS=3-1-stable AREL=2-2-stable | ||
- RAILS=3-0-stable AREL=2-0-stable | ||
global: | ||
- SQ_CONFIG_FILE=$TRAVIS_BUILD_DIR/spec/config.travis.yml | ||
matrix: | ||
- RAILS=master AREL=master ADAPTER=sqlite3 | ||
- RAILS=4-1-stable AREL=5-0-stable ADAPTER=sqlite3 | ||
- RAILS=4-0-stable AREL=4-0-stable ADAPTER=sqlite3 | ||
- RAILS=3-2-stable AREL=3-0-stable ADAPTER=sqlite3 | ||
- RAILS=3-1-stable AREL=2-2-stable ADAPTER=sqlite3 | ||
- RAILS=3-0-stable AREL=2-0-stable ADAPTER=sqlite3 | ||
- RAILS=master AREL=master ADAPTER=mysql | ||
- RAILS=4-1-stable AREL=5-0-stable ADAPTER=mysql | ||
- RAILS=4-0-stable AREL=4-0-stable ADAPTER=mysql | ||
- RAILS=3-2-stable AREL=3-0-stable ADAPTER=mysql | ||
- RAILS=3-1-stable AREL=2-2-stable ADAPTER=mysql | ||
- RAILS=3-0-stable AREL=2-0-stable ADAPTER=mysql | ||
- RAILS=master AREL=master ADAPTER=mysql2 | ||
- RAILS=4-1-stable AREL=5-0-stable ADAPTER=mysql2 | ||
- RAILS=4-0-stable AREL=4-0-stable ADAPTER=mysql2 | ||
- RAILS=3-2-stable AREL=3-0-stable ADAPTER=mysql2 | ||
- RAILS=3-1-stable AREL=2-2-stable ADAPTER=mysql2 | ||
- RAILS=master AREL=master ADAPTER=postgresql | ||
- RAILS=4-1-stable AREL=5-0-stable ADAPTER=postgresql | ||
- RAILS=4-0-stable AREL=4-0-stable ADAPTER=postgresql | ||
- RAILS=3-2-stable AREL=3-0-stable ADAPTER=postgresql | ||
- RAILS=3-1-stable AREL=2-2-stable ADAPTER=postgresql | ||
- RAILS=3-0-stable AREL=2-0-stable ADAPTER=postgresql |
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
databases: | ||
mysql: | ||
database: squeel_test_examples | ||
username: travis | ||
encoding: utf8 | ||
mysql2: | ||
database: squeel_test_examples | ||
username: travis | ||
encoding: utf8 | ||
postgresql: | ||
database: squeel_test_examples | ||
min_messages: warning | ||
username: postgres |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
databases: | ||
mysql: | ||
database: squeel_test_examples | ||
username: squeel | ||
encoding: utf8 | ||
mysql2: | ||
database: squeel_test_examples | ||
username: squeel | ||
encoding: utf8 | ||
postgresql: | ||
database: squeel_test_examples | ||
min_messages: warning |
Oops, something went wrong.