nyamsprod,
@nyamsprod@phpc.social avatar

Coming soon in the next minor release of League\Csv 😍
still ironing the feature that you can already test on the master branch. give it a try
https://csv.thephpleague.com/9.0/reader/statement/#where-clauses

derflocki,
@derflocki@phpc.social avatar

@nyamsprod neat idea. I'm curious have you experimented with (does this even work in php) the csv support in sqlite? https://www.sqlite.org/csv.html

nyamsprod,
@nyamsprod@phpc.social avatar

@derflocki there are a couple reasons why I do not use SQLite. First the package needs no dependencies, two, the feature was already present in the package like 7 years ago I only updated the UX around it and last but not least I seldom encounter CSV that adheres fully to the draft/informal RDC. Hence using the SQLite extension would not solve CSV parsing in real world IMHO.

derflocki,
@derflocki@phpc.social avatar

@nyamsprod Thanks for the explanation!

thomas_shone,
@thomas_shone@fosstodon.org avatar

@nyamsprod love it. Possibly typo in the documentation though. Should it be addWhere or andWhere? The list of 3 logical xxWhere methods contain andWhere but the example shows addWhere.

nyamsprod,
@nyamsprod@phpc.social avatar

@thomas_shone should be andWhere will fix the document thanks for the quick look👍

kaystrobach,
@kaystrobach@mastodon.social avatar

@nyamsprod will you add pseudo sql support?

nyamsprod,
@nyamsprod@phpc.social avatar

@kaystrobach it was already present now just making it a bit more obvious and easy to use I hope.
It feels like SQL but it's 100% PHP at its core

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • kavyap
  • InstantRegret
  • ethstaker
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • tacticalgear
  • slotface
  • Durango
  • khanakhh
  • rosin
  • everett
  • Leos
  • vwfavf
  • normalnudes
  • osvaldo12
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ngwrru68w68
  • anitta
  • provamag3
  • tester
  • modclub
  • megavids
  • JUstTest
  • All magazines