19
jeeper
4d

So these motherfuckers... they have stored the queries to generate the reports... fucking guess where. Just guess.

They stored the queries AS FUCKING STRING DATA IN THE TABLE. And you know how they get the parameters? A FUCKING JOIN WHERE THEY HAVE STORED THE PARAMS AS DATA IN ANOTHER TABLE.

So you query set the params to query to get the query to get that is joined with a query to get the reports.

If God is a programmer after all y’all are fuuuuuuuuuuuuuucked

Comments
  • 1
    ... Starter course in SQL and never bothered to learn it for real. I hate those people.
  • 0
    there is some usage in thinga similar to this. e.g. the company i work at is developing a highly configurable "digital asset management system" (short "DAM")... in this example you can configure the mapping from external metadata fields (XMP) to and from internal metadata fields (everything condigurable to your liking)... we store the data about how everything is defined (down to the java data types such as String) in the database and then generate statements based on reflection and a shitton of prepared statements that (in part) also have to be stored in a database for everything to work.... i have to admit tho, that this is an exremely rare usage where IN MY OPINION this is valid and i agree that in most cases this is utter shit
  • 1
    addalitionally: what i mentioned above is in part done because of the structure of the "legacy core" as the oldest part of the project is named
  • 1
    This is so cringy just imaging it gives me horror even annabelle can't compare to this... damn
  • 1
    Wait, you store SQL in your database as strings? Sounds like SQL injection time... lol
  • 0
    @noobrants I thought about this too. Like hey let’s just leverage the sql injection vulnerability to our own ends. It’s like they invented a new anti pattern: SQL injection as a critical component.
Your Job Suck?
Get a Better Job
Add Comment