Skip to content
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

Table specific export limits #175

Open
zzroche opened this issue Oct 17, 2019 · 6 comments
Open

Table specific export limits #175

zzroche opened this issue Oct 17, 2019 · 6 comments

Comments

@zzroche
Copy link

zzroche commented Oct 17, 2019

In function "getTableLimit" i've removed this code:
// if (!is_numeric($limit)) {
// return false;
// }

so I can do a limit partition for extra dimension table.
First tranche "0, 100000"
second tranche "100001, 200000"

@ifsnop
Copy link
Owner

ifsnop commented Oct 20, 2019

Maybe it will be easier to permit a number or an array (to support from to syntax in the limit clause). If it is useful, it can be implemented.

@zfmaster
Copy link

zfmaster commented Dec 25, 2019

Maybe it will be easier to permit a number or an array (to support from to syntax in the limit clause). If it is useful, it can be implemented.

I suggest next syntax:

// This still works
$dump->setTableLimits([
    'customer' => 10,
]);
$dump->setTableLimits([
     'customer' => [
          'limit' => 10, // Mandatory parameter
          'offset' => 5, // Optional parameter
          'orderBy' => 'id DESC' // Optional parameter
       ]
]);

What do you think?

@ifsnop
Copy link
Owner

ifsnop commented Dec 25, 2019

For me it looks good. Maybe it is a little bit complicated, but I think this could be an "advanced" feature, that needs some preparation from the user. It solves the problem that each table needs its own limit, offset and order clause.

Same was done for the where clause.

@zfmaster
Copy link

@ifsnop , ok, I will prepare PR and we could check it one more time when proof of concept will work.

@smalos
Copy link
Contributor

smalos commented Aug 17, 2020

@zfmaster Is there an update from your side?

@megaxorg
Copy link

The option to offset would be great

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

No branches or pull requests

5 participants