You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The readme makes an introduction or lightly touches on the getting started with massive. However, it begins with
Code Please
Let's say we have a table named "Products". You create a class like this:
publicclassProducts:DynamicModel{//you don't have to specify the connection - Massive will use the first one it finds in your configpublicProducts():base("northwind","products","productid"){}}
You could also just instantiate it inline, as needed:
But only towards the end, at the bottom, does it ever mention:
Factory Constructor
One thing that can be useful is to use Massive to just run a quick query. You can do that now by using "Open()" which is a static builder on DynamicModel:
As if it were an "Oh yeah! We forgot to mention..." My suggestion is to incorporate this sooner or closer to the top, as part of the intro. Possibly if they are not the same thing (which, why wouldnt they be?... idk, it's separated and placed towards the bottom for who knows what reason) provide use-examples to clarify it's design or best case scenario. To me, this var db = ... is the norm, and what i normally look for when messing around with database. But then again, that's why i'm here, and why this tool is so useful. It's because it caters to those who perform inline sql, on a per use basis. Why not give us that little bone at the start of the introductions, rather than towards the end of that major tl;dr?
Since we're all trying to find ways to streamline productivity, it would be a disappoint for me to have missed that part hidden, even way after insert and update. I could've potentially been stuck rewriting lines and lines of code, it werent abundantly clear that hey, maybe i can use something i'm already familiar with
The text was updated successfully, but these errors were encountered:
The readme makes an introduction or lightly touches on the getting started with massive. However, it begins with
But only towards the end, at the bottom, does it ever mention:
As if it were an
"Oh yeah! We forgot to mention..."
My suggestion is to incorporate this sooner or closer to the top, as part of the intro. Possibly if they are not the same thing (which, why wouldnt they be?... idk, it's separated and placed towards the bottom for who knows what reason) provide use-examples to clarify it's design or best case scenario. To me, thisvar db = ...
is the norm, and what i normally look for when messing around with database. But then again, that's why i'm here, and why this tool is so useful. It's because it caters to those who perform inline sql, on a per use basis. Why not give us that little bone at the start of the introductions, rather than towards the end of that majortl;dr
?Since we're all trying to find ways to streamline productivity, it would be a disappoint for me to have missed that part hidden, even way after
insert
andupdate
. I could've potentially been stuck rewriting lines and lines of code, it werent abundantly clear thathey, maybe i can use something i'm already familiar with
The text was updated successfully, but these errors were encountered: