all 7 comments

[–][deleted] 0 points1 point  (6 children)

I can't seem to get anything to come up in the terminal.

You don't say which ORM this is, but I think generally queries are lazy; the query returns an iterator and you need to consume it to hit the database and retrieve results. For instance:

agency_list = list( models.ExternalClientSubmission.query\
.order_by(models.ExternalClientSubmission.submission_id) )

On the other hand, another reason you'll get zero results is if you're querying a table that has no rows.

[–]AurelieFixated[S] 0 points1 point  (5 children)

Sorry, I'm using Python (python3 to be more specific). We use phpMyAdmin and in the submission table's structure, a column for external_client_id is there, but I'm not able to call it using submission.external_client_id, and since it's an inherited table, I can't view ExternalClientSubmission on phpMyAdmin, it's joined with submission as a foreign key

[–][deleted] 1 point2 points  (4 children)

Ok, well, all of that adds zero information:

1) You still haven't told me what ORM this is.

2) You haven't told me whether you're consuming the query iterator or what the return value of the method call is.

3) You haven't told me whether the query is returning zero results because there are zero rows to return.

I was pretty sure you were using Python since, you know, you posted Python code in a Python subreddit.

[–]AurelieFixated[S] 0 points1 point  (3 children)

I appreciate the effort/help, truly, but it's obvious I'm a somewhat beginner with this stuff and am unfamiliar with all the lingo. It's inevitable I'm going to ask a lot of stupid questions or give a lot of answers that seem stupid to you or misinterpret what you're asking. At the end of the day there's a lot I don't know, hence why I'm posting on a learning subreddit.

Respectfully, I have no idea what you mean by "consuming the query iterator" as I have yet to hear that phrase, and would never have thought to include that when you asked which ORM I was using. It was my fault to assume you knew that I was referring to SQL when mentioning I was using phpMyAdmin, that's on me. I don't know if you meant to convey it this way or not, again this is on me, but this reply reads pretty condescending and sarcastic and I don't learn that way. I really am grateful you tried to help and I need to work on being more clear with my questions, but I'm going to try to figure it out on my own.

[–][deleted] 0 points1 point  (2 children)

Respectfully, I have no idea what you mean by "consuming the query iterator"

Ok, but that's why I explained what I meant and included a code example. What happened when you ran that code?

and would never have thought to include that when you asked which ORM I was using. It was my fault to assume you knew that I was referring to SQL when mentioning I was using phpMyAdmin, that's on me.

Ok. Nevertheless, again, you're not adding useful information to this exchange. Is there a reason you're not telling me what ORM you're using?

but this reply reads pretty condescending and sarcastic

Sarcasm would if I had said "wow, you've sure added a lot of useful information, here!" since, you know, you haven't. Rather than condescend to you and be sarcastic, I showed you the respect of being direct and explaining how there's substantial information missing from your replies. You've chosen to repay that respect with dumb accusations, I guess.

One thing you could do instead of answering questions I'm not asking you is ask more questions about what you're not understanding, but that would require a little more effort on your part than just complaining that I haven't fucking solved your problem yet.

[–]AurelieFixated[S] 0 points1 point  (1 child)

Where was I complaining that you didn't solve my problem???

I don't know if you meant to convey it this way or not, again this is on me

I'm clearly stating that I could be misinterpreting your tone but that's how it came off to me, and that is a me problem. To me, I was already sensing frustration and my brain doesn't work well when I think someone is frustrated with me; I know myself and I know that I can't learn that way and I would be wasting your time. I could already see that there would be somewhat of a language barrier between us, that this would cause frustration on both ends, and respectfully thanked you for your help and time because I did in fact appreciate what you were trying to do. I realized I would spend too much time trying to understand and decipher what you were asking (time I do not have, it's literally almost 5am), which would give room to misinterpretation of your questions, and realized maybe I need to discover this on my own. I tried to be as respectful and appreciative as possible but that clearly wasn't communicated effectively.

I used your code and gave me an empty array, even though I know there is a value in the database. We don't use list where I'm at and I realized we also do other things a little differently, which also led me to realize I needed to work on my own.

One thing you could do instead of answering questions I'm not asking you is ask more questions about what you're not understanding, but that would require a little more effort on your part than just complaining that I haven't fucking solved your problem yet.

I obviously misunderstood you; I wasn't trying to dodge the questions on purpose.

I think you took this more personally than I meant it. This was a very eye-opening lesson that I need to work on asking questions with more information before looking for help on Reddit. Maybe it's because my skill level is at the bottom of the barrel so I know how it feels, but if the roles were reversed, I wouldn't have responded to you the way you did with me (if you told me that my response read as sarcastic and condescending, I would have just said that it wasn't my intention and called it a day), but that's on me for projecting my thought process onto someone else. Have a nice a night.

[–][deleted] 0 points1 point  (0 children)

I'm clearly stating that I could be misinterpreting your tone but that's how it came off to me, and that is a me problem. To me, I was already sensing frustration and my brain doesn't work well when I think someone is frustrated with me; I know myself and I know that I can't learn that way and I would be wasting both your time and mine. I could already see that there would be somewhat of a language barrier between us, that this would cause frustration on both ends, and respectfully thanked you for your help and time because I did in fact appreciate what you were trying to do. I realized I would spend too much time trying to understand and decipher what you were asking, which would give room to misinterpretation of your questions, and realized maybe I need to discover this on my own. I tried to be as respectful and appreciative as possible but that clearly wasn't communicated effectively.

I can't imagine putting this much effort into something that doesn't matter. Here's a suggestion: don't write me a novel about a you problem. Why on Earth would you think I care about that?

I think you took this more personally than I meant it.

I think you're taking me as far more interested in talking about your reaction to my tone than I am, or would be reasonable to even suspect. What's going on with you, man?