Django ORM - Performing raw SQL queries

  Рет қаралды 36,027

Very Academy

Very Academy

Күн бұрын

Пікірлер: 15
@treblaoj
@treblaoj 2 жыл бұрын
Such an excellent peace of teaching!! Thanks to much for the class!
@fabiofboful
@fabiofboful Жыл бұрын
Thank you so much man.
@vishnudasks
@vishnudasks 10 ай бұрын
You are Great
@URKI3221
@URKI3221 2 жыл бұрын
hello, first i want to thank you because these totorials have been useful for me, and i want to ask you if it's possible to use stored procedure or function instead of raw sql to load data in a model. thanks in advance
@veryacademy
@veryacademy 2 жыл бұрын
Good to hear. Do you mean using fixtures?
@URKI3221
@URKI3221 2 жыл бұрын
​@@veryacademy not exactly, I mean, you're using raw sql to populate a model "SELECT * FROM SQLITETABLE", I'm using postgres function to return data. i'll reformulate my question, how can we load data retreived from a cursor into a model?
@MrRahul15937
@MrRahul15937 2 жыл бұрын
Hello sir, Kindly guide on how to take Boolean searches from user forms and implement Raw queries
@tusharjangid2492
@tusharjangid2492 4 жыл бұрын
Really well explained, thanks for the video🙌.
@PEMIDI
@PEMIDI 3 жыл бұрын
very useful
@veryacademy
@veryacademy 3 жыл бұрын
Glad you think so!
@dharunap9906
@dharunap9906 9 ай бұрын
May i know how to perform insert and delete using this raw method
@sanjaykrish8719
@sanjaykrish8719 2 жыл бұрын
Thanks a lot. Not a big fan of ORM
@mateoscarafia5110
@mateoscarafia5110 2 жыл бұрын
long live raw sql
@jenilgandhi2111
@jenilgandhi2111 4 жыл бұрын
def search_query(request): print(request.POST['search_query']) # x=likes.objects.raw("Select Like_id,likes.Post_id from home_likes") # Operational Error: No column found Post_id x=likes.get_treding() print(len(x)) return render(request,'search/search_query_page.html') CAN YOU SOLVE THIS
@jenilgandhi2111
@jenilgandhi2111 4 жыл бұрын
my models is class likes(models.Model): like_id=models.AutoField(primary_key=True) post_id=models.ForeignKey(post,on_delete=models.CASCADE) liker_user=models.ForeignKey(User,on_delete=models.CASCADE) date_liked=models.DateField(default=datetime.date.today)
Django bypass ORM! - Performing raw SQL queries without the ORM
11:57
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 448 М.
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
Decomplexify
Рет қаралды 2,2 МЛН
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 226 М.
Django OR query
22:09
Very Academy
Рет қаралды 41 М.
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 99 М.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 248 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН