Expression support for SQL compatible datasources and value casting #490

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
3 participants
@jails
Contributor

jails commented May 26, 2012

Close #28 and #402.

@jails

This comment has been minimized.

Show comment Hide comment
@jails

jails May 26, 2012

Contributor

updated !

Contributor

jails commented May 26, 2012

updated !

@gwoo

View changes

data/source/Database.php
- return strtotime($value);
- }
+ return $this->_cast($type, $value);
+ break;

This comment has been minimized.

Show comment Hide comment
@gwoo

gwoo May 26, 2012

Contributor

should be able to remove the break since there is already a return.

@gwoo

gwoo May 26, 2012

Contributor

should be able to remove the break since there is already a return.

@jails

This comment has been minimized.

Show comment Hide comment
@jails

jails May 26, 2012

Contributor

Good catch !

Contributor

jails commented May 26, 2012

Good catch !

@@ -581,7 +596,7 @@ public function testConditions() {
));
$sql = "SELECT * FROM {mock_database_posts} AS {MockDatabasePost} WHERE ";
$sql .= "({MockDatabasePost}.{id} = 0 OR {MockDatabasePost}.{title} = 'value2' OR ";
- $sql .= "({MockDatabasePost}.{author_id} = 1 AND {MockDatabasePost}.{created} = '2') OR ";
+ $sql .= "({MockDatabasePost}.{author_id} = 1 AND {MockDatabasePost}.{created} = '2012-05-25 23:41:00') OR ";

This comment has been minimized.

Show comment Hide comment
@nateabele

nateabele May 26, 2012

Owner

This line looks like it breaks QA.

@nateabele

nateabele May 26, 2012

Owner

This line looks like it breaks QA.

@@ -613,7 +628,7 @@ public function testHaving() {
));
$sql = "SELECT * FROM {mock_database_posts} AS {MockDatabasePost} HAVING ";
$sql .= "({MockDatabasePost}.{id} = 0 OR {MockDatabasePost}.{title} = 'value2' OR ";
- $sql .= "({MockDatabasePost}.{author_id} = 1 AND {MockDatabasePost}.{created} = '2') OR ";
+ $sql .= "({MockDatabasePost}.{author_id} = 1 AND {MockDatabasePost}.{created} = '2012-05-25 23:41:00') OR ";

This comment has been minimized.

Show comment Hide comment
@nateabele

nateabele May 26, 2012

Owner

So does this one.

@nateabele

nateabele May 26, 2012

Owner

So does this one.

@nateabele

This comment has been minimized.

Show comment Hide comment
@nateabele

nateabele May 26, 2012

Owner

Left a couple notes. When you're done, can you squash this into one commit? Then we'll merge. Thanks. :-)

Owner

nateabele commented May 26, 2012

Left a couple notes. When you're done, can you squash this into one commit? Then we'll merge. Thanks. :-)

@jails jails closed this May 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment