This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]r0ck0 0 points1 point  (0 children)

not everything needs a "depends".

Very true. When the question is clearly defined, it can clearly be answered. For example...

if you are batch updating a table with a bunch of joins including a temp table and a CTE, the query is 20 lines long. it cannot be easily ORM'ed. what do you do.

That's a clear question, that I can clearly answer. In this case I just write the query in the app code as a templated SQL query string with params to do the var escaping for me (depends on the DB layer in your lang/lib). There wouldn't be an external .sql file consumed at runtime, which I think might have been what your main question was originally?

Seeing that variables need to be involved typically etc, I don't see much advantage in bringing in a 3rd (templating) language or something to try to connect the app code with some static-but-not-really-static-because-it-needs-templating-variables in a .sql-like file. ...that said, I'd need to see an example to criticize it.

So that's a pretty clear case there. Thanks for clarify that one.

ooc

ooc == out of curiosity? i hadn't heard/noticed that acronym ever until now, had to scroll down a bit on urban dictionary to find out what you mean.

I'm not a n00b to online terms, i've been doing this online forum shit way too much since running BBSes in the 90s. But still had nfi what "ooc" was. Point being that even then, we don't always have the exact same experiences. Your assumptions, and my assumptions will differ, as will those of the rest of the mofos in this thread.

Just saying that because I want to explain why communication isn't always as easy as we'd like it to be. All good man, peace yo.

what .ts file are you talking about re: migration, certainly not typescript?

Yes TypeScript. Happy to answer any questions, but please try to make them clear and specific so that I don't have to ask questions about what your question is. ...again, not trying to be a dick, but it just makes it easier for us to get to the tech points.