I have a Django application, and it works fine. So far, the connection to Oracle seems to be ok. The problems is when I try to query data. I use the objects property and it gives me
"ORA-00933: SQL command not properly ended"
error. So far I ven looking the query and I think is the problem. Anyway, I try that same query on oracle and sems to be pk
print(CONTRIBUYENTES.objects.using('VIALISDB').all().query)
SELECT "FGESILDOWN.SILD_DET_CONTRIBUYENTES"."DTCO_FOLIOSOLICITUD" FROM "FGESILDOWN.SILD_DET_CONTRIBUYENTES"
Does someone knows the problem?
Related
Django "caches" my query. I realized it after updating my Database. When i run the Function with the Query, it takes some old Data before the Update. When i restart the Server, it works fine again.
Do anyone know, how i can solve this issue?
I use Raw Queries with the connection-function. (connection.cursor(sql)). In the End of each Query, i close the cursor with cursor.close().
I debugged the Code and found out, that after Updating my Database it takes the old Data until i restart my Server.
I'm using Sitecore fast query to get results. But I'm not getting any results if I use the query in master db, I tried running it in XPath viewer as well. But I get the results for Sitecore query. The same fast query works against web database.
fast://#sitecore#/#content#/#Something#/#Something#/#AU#/#Website#/ancestor-or-self::*[##templateid='{463D7680-BF52-49DF-B7D5-88E97416A1FA}']/Configuration/Navigation/Footer Bottom Right/*
Instead of ancestor-or-self:: use //* :
fast://#sitecore#/#content#/#Something#/#Something#/#AU#/#Website#//*[##templateid='{463D7680-BF52-49DF-B7D5-88E97416A1FA}']/Configuration/Navigation/Footer Bottom Right/*
I still really don't understand what is the cause of the issue, But cleaning up all the databases solved the issue.
My function running query, its taking sometime depending on requested data. While query running, I want to show real query loading cfprogressbar & changing status/title while cfprogressbar doing progress. im still searching on google till now no luck all examples showing static time.
I was thinking if i can get real cfquery loading time & i'll pass that value to cfprogressbar. Please advise
coldfusion 11
windows 2012
cfprogressbar
cfquery
Unfortunately you can't show an accurate progress bar. The ColdFusion engine does not run your query, the database server runs your query and for that reason the ColdFusion engine does not know where your db server is at while running the query. You can show a 'spinner' if you want to let your user know that something is going on.
I'm currently in the process of optimizing my Django app, which is acting as an API for my front-end with the Django Rest Framework. While running my server in debug mode, I've noticed that every time a queryset gets executed, there's a query run right before it that always looks like this:
SELECT COUNT('*') AS "__count" FROM "table_name WHERE ..."
The ... part always mirrors the query that returns the objects that I want. I'm unsure if this is only run in debug, something that the QuerySet object does innately, or an error with my code. Would appreciate some insight as to why this is happening and if it's something I need to worry about
This occurs in Django Rest Framework when you are using paging on a list view:
One query to fetch the data for your current page.
A second query to calculate the total number of records for the same queryset.
Hi I have some problems that has been bothering me for a week. I am running Selenium testing scripts on my dev machine, and in my test I would call simple script to delete accounts by their sub domain names:
for a in Account.objects.filter(domain = sub_domain):
a.delete()
The problem is that the query to find all such accounts are not returning correct results after the first time it is run (I use this query to clean up the database before each test). When I set a break point at this point, I can see the query return 0 records, even though in the database it has one record. I also set up mysql query log to see the actual query Django sent to mysql, and the query looks good, and will return correct result if I copy and paste to mysql command shell.
What am I missing? Why Django model query does not give me the correct result? MySQL is using InnoDB engine in case that makes any difference.
Transactions. Do a COMMIT in the shell.
This is a recurring problem, so I'm doing a shameless plug with a question in which I described details of the problem:
How do I deal with this race condition in django?