Skip to content

Row normalization#138

Open
Unlink wants to merge 2 commits intonette:masterfrom
Unlink:row-normalization
Open

Row normalization#138
Unlink wants to merge 2 commits intonette:masterfrom
Unlink:row-normalization

Conversation

@Unlink
Copy link
Contributor

@Unlink Unlink commented Jun 2, 2016

Closes #36 and #100

@Unlink Unlink force-pushed the row-normalization branch from c9541dc to 95ead5a Compare June 2, 2016 14:37
for ($i=0; $i<$statement->columnCount(); $i++) {
$meta = $statement->getColumnMeta($i);
$tableName = isset($meta['table']) ? $meta['table'] : '';
if (isset($cols[$meta['name']])) {
Copy link
Member

Choose a reason for hiding this comment

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

IMHO $cols[$meta['name']][] = $tableName; is always good, without if

@dg
Copy link
Member

dg commented Jun 2, 2016

For what cases it is necessary to have its own normalizer? And normalizer and own row factory?

@Unlink Unlink force-pushed the row-normalization branch from 95ead5a to 77e7871 Compare June 10, 2016 09:17
@Unlink Unlink force-pushed the row-normalization branch from 77e7871 to 5ed5dfd Compare June 10, 2016 09:29
@Unlink
Copy link
Contributor Author

Unlink commented Jun 10, 2016

Sry for late response. So, at first this PR allow create your own row normalizer for whole session because you should specify it in config. Sometimes i need work with geomatics data types eg. point and it will be nice if i could wrap it in my own class globaly. According to #36 i added possibility to specify row normalizer for specific ResultSet, so you can for example turn off normalization if you need.

RowFactory is used internally in Selection. It's because i want to use whole ResultSet with duplicate columns check feature... so i don't create at first Row instances and then ActiveRow from them but i used row factory so ResultSet::fetch return correct instances. I was also thinking about change ActiveRow to use Row instead of plain array, but i don't know.

@dg dg force-pushed the master branch 2 times, most recently from 5c87d56 to d9fd67a Compare June 27, 2016 23:11
@dg
Copy link
Member

dg commented Jun 28, 2016

@Unlink Thanks for all the PR. I'm sorry that I did not have time for Nette Database. I merged commit with improved error message on duplications. Now I'd like to release NDB 2.4, because it is the last unreleased package, and than I'll merge others PR like #102/#105, row normalizer, and we can discuss about refactoring Structure. Next NDB 2.5 can be released in few months. Ok?

@Unlink
Copy link
Contributor Author

Unlink commented Jun 29, 2016

ok, thanks :)

@dg dg force-pushed the master branch 13 times, most recently from 44a230d to 829b936 Compare October 18, 2016 13:01
@dg dg force-pushed the master branch 2 times, most recently from b74e9fb to b2e321a Compare December 3, 2016 18:55
@dg dg force-pushed the master branch 10 times, most recently from 834381a to 0818225 Compare February 2, 2017 02:52
@dg dg force-pushed the master branch 4 times, most recently from abe9849 to 9358712 Compare June 29, 2017 15:38
@dg dg force-pushed the master branch 7 times, most recently from f1a9aa2 to ec7a207 Compare July 26, 2017 21:39
@dg dg force-pushed the master branch 5 times, most recently from d254968 to 18f14b8 Compare March 23, 2018 15:00
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.

Configuring row normalization

2 participants