Giter Club home page Giter Club logo

conveyor-belt's Issues

Step continue amount

Maybe it would be useful if instead of yes/no it was "Step(s)" and defaulted to 1 and 0 or no exited

Maybe useful to inspect the first few for accuracy and then let all continue when satisfied

Move from Box/Spout to OpenSpout

Is your feature request related to a problem? Please describe.
Not really a problem. Just saw that spout is unmaintained, and the folks at Spatie moved to its forked, mantained version openspout

Describe the solution you'd like
Simple change the dependency

Describe alternatives you've considered
None

Additional context
For reference, this is the commit in spatie/simple-excel

spatie/simple-excel@44ad112

Support for any kind of `Collection`

Hello,
First of all, thank you very much for taking the time to build this package.

I'm usually building migrations from one DB to another. For example from a Drupal DB to a Laravel implementation, or from WP to Laravel.

When doing it I usually configure a new connection, and pull from it process the data and insert into a Laravel/Twill app.
For that matter I use the new DB connection for pulling the records like:

DB::connection('drupal')
    ->table('node')
    ->orderBy('node.nid');

These kind of queries return a collection, a Illuminate\Support\Collection
instead of the collection that eloquent returns Illuminate\Database\Eloquent\Collection

Would if be possible to make it generic by changing the processChunk function in the src/IteratesQuery.php to accept Illuminate\Support\Collection?

#replace
\\    use Illuminate\Database\Eloquent\Collection;
#by
    use Illuminate\Support\Collection;

So the src/Support/ConveyorBelt.php needs to update the getChunkHandler function to:

    protected function getChunkHandler(): Closure
    {
        return function ($items) {
            $this->command->prepareChunk($items->collect());

            foreach ($items as $item) {
                if (false === $this->presentRow($item)) {
                    return false;
                }
            }

            return true;
        };
    }

Please let me know what do you think and if it is ok to build a pull request for it.

Best.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.