# |
Sep 12th 2019, 16:38 |
jh |
now sadly there are no declarative shadow doms |
# |
Sep 12th 2019, 16:38 |
jh |
creating reset and default stylesheets that never annoy you |
# |
Sep 12th 2019, 16:38 |
jh |
you can basicall define defaults that have 0 specificity |
# |
Sep 12th 2019, 16:38 |
jh |
https://github.com/w3c/csswg-drafts/issues/2143 |
# |
Sep 12th 2019, 16:38 |
jh |
here is something that will mean you can drop a lot of the preprocessing |
# |
Sep 12th 2019, 16:37 |
this.impetus |
we are all sinners on this Earth |
# |
Sep 12th 2019, 16:36 |
jh |
SCSS i hope :P |
# |
Sep 12th 2019, 16:36 |
jh |
SASS :( |
# |
Sep 12th 2019, 16:36 |
this.impetus |
haha inoas you are vastly overestimating my knowledge brother. talk to me about SASS frameworks and I can dance. |
# |
Sep 12th 2019, 16:36 |
jh |
there is also lazy association loading plugin which would fire queries once you access associations of entities on the fly |
# |
Sep 12th 2019, 16:35 |
jh |
for reference Rails's arel works the same pretty much afair |
# |
Sep 12th 2019, 16:35 |
this.impetus |
thanks! I mean I don't know if I'm going to make use of that today, but that's a paradigm-shifting insight (to me). |
# |
Sep 12th 2019, 16:35 |
this.impetus |
oh! |
# |
Sep 12th 2019, 16:35 |
this.impetus |
oooooh |
# |
Sep 12th 2019, 16:35 |
jh |
until you do that you can continue to build the query object, adding more finders, adding more conditionals etc |
# |
Sep 12th 2019, 16:34 |
jh |
foreach, or toArray() |
# |
Sep 12th 2019, 16:34 |
jh |
@this.impetus so the query builder in cakephp builds some object that then is converted to vendor specific (mariadb, postgres, etc) sql code and executed once you want to access data out of it |
# |
Sep 12th 2019, 16:20 |
this.impetus |
@jh It may help you to know that I am a front-end guy, haha; I loosely understand what you've said, but not really the implications beyond the simple idea that there are fast and slow, or efficient and inefficient ways to retrieve data. :S |
# |
Sep 12th 2019, 16:17 |
jh |
not sure about the contains though... probably only for the primary query |
# |
Sep 12th 2019, 16:16 |
jh |
->sql() will get you the sql (with placeholders) |
# |
Sep 12th 2019, 16:16 |
jh |
afair the query builder is lazy aka if you do not fetch something from it it is just a query object |
# |
Sep 12th 2019, 16:16 |
jh |
toArray() will also run formatResults and not sure if only then or earlier all the accessors in the entities |
# |
Sep 12th 2019, 16:13 |
this.impetus |
On any other day I'd be super curious about that, haha, today is just get-to-the-finish-line. But thanks modi |
# |
Sep 12th 2019, 16:12 |
ricksaccous |
pretty much transforms it into an array of entities, which is great because there is a lot you can do with entity magic |
# |
Sep 12th 2019, 16:11 |
this.impetus |
oh thank god. :the_horns: |
# |
Sep 12th 2019, 16:11 |
ricksaccous |
it won't be exactly like cakephp2 but yep |
# |
Sep 12th 2019, 16:10 |
ricksaccous |
->toArray |
# |
Sep 12th 2019, 16:10 |
this.impetus |
Last question today guys, I swear; is there any means at all of getting a query object to just dump an array of data as cake once did? One of those days where I jsut want to get the work done and do the learning on my own time... |
# |
Sep 12th 2019, 15:48 |
jh |
like so https://gist.github.com/inoas/1226835ee066cf54c3bf1f30b1ec028d |
# |
Sep 12th 2019, 15:46 |
jh |
@admad yay it works... custom AppErrorMiddleware |
# |
Sep 12th 2019, 15:45 |
jh |
I would be explicit about it. |
# |
Sep 12th 2019, 15:45 |
jh |
a references b references a |
# |
Sep 12th 2019, 15:45 |
jh |
@ricksaccous if you setup a recursive function, yes, but do not forget that there can be loops so you need to stop the looping |
# |
Sep 12th 2019, 15:43 |
this.impetus |
:slightly_smiling_face: |
# |
Sep 12th 2019, 15:43 |
ricksaccous |
oh well, good luck |
# |
Sep 12th 2019, 15:43 |
ricksaccous |
lolll |
# |
Sep 12th 2019, 15:43 |
ricksaccous |
70 page CV, would anyone even read that |
# |
Sep 12th 2019, 15:43 |
this.impetus |
He has a 70 page CV. Guy is a luminary. Haha, but in any case, failing to have found a magic bullet, I'll just do it by hand. thanks, as usual |
# |
Sep 12th 2019, 15:42 |
ricksaccous |
but it also sounds like if it's just a single CV how bad could the query actually be anyway |
# |
Sep 12th 2019, 15:42 |
ricksaccous |
welp, good luck sounds like you could adjust the associations based on request data though |
# |
Sep 12th 2019, 15:41 |
this.impetus |
lol I need all the fields, haha. I'm building a digital CV for an academic who wants it utterly modular so a visitor could assemble a PDF based on which lines they want, it's a crazy amount of work to just print out what is essentially a document |