当前位置:网站首页>Use of transactions - Django, SQL tools
Use of transactions - Django, SQL tools
2022-07-19 05:03:00 【du fei】
Third party modules need to be installed when using
pip install django-haystack whoosh jieba -i https://pypi.python.org/simple/ # Lock
from django.db import transaction
# Open transaction
with transaction.atomic():
# Add rollback
point = transaction.savepoint()
try:
User.objects.filter(name='zhangsan').update(name='wangwu')
except Exception as e:
print(e)
# Rollback when the modification fails
transaction.savepoint_rollback(point)
# Submit after success
transaction.savepoint_commit(point)sql The command line in
select @@global.transaction_isolation; Look at the big picture
select @@transaction_isolation; View the current
set session transaction isolation level serializable; Serializable
Open transaction
mysql> start transaction;
end
commitlink : https://pan.baidu.com/s/1WW8TF1PnOBZPHAK8N_uJMw?pwd=tvu5
Extraction code : tvu5
Copy the content and open Baidu disk , It is more convenient to operate
full name (Name):cr173
Serial number (Code):8d8120df-a5c3-4989-8f47-5afc79c56e7c Change Password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
# 6.SQLyog Be overdue , How to decode
I'm using SQLyog 9.63, There's only a one month probation period , How to exceed the probation period , What do I do ?
At this time, I can tell you a solution , That is by deleting the registry key , Get another month's probation . The specific operation method is as follows :
First step , Enter... In the run window regedit, Enter to enter the registry editor .
The second step , By path HKEY_CURRENT_USER->SoftWare Find the one marked in red {8E919370-*} term .
## The third step , Right click the item , Choose Delete , Click Yes again .
边栏推荐
猜你喜欢

DSL search results processing, including sorting, paging, highlighting

elment-ui使用方法

Basic operations of index library operation

POC——DVWA‘s SQL Injection

shardingsphere的核心概念和快速实战

CVE-2020-10199 Nexus Repository Manager3远程命令执行漏洞复现

邮箱发送邮件(包含附件,网易、QQ)

ModelArts第二次培训笔记

Database learning notes (I) retrieval data

pygame安装-Requirement already satisfied问题
随机推荐
NoSQL概述
md5 密码加密
Harmonyos fourth training notes
sleuth入门
ThreadLocal线程安全示例及其原理
Desensitization field example
一文了解配置中心
Encryption and decryption
POC——DVWA‘s XSS Reflected
String string special interception processing according to symbols
FanoutExchange交换机简单使用
Microservice high concurrency service governance
SQL语句学习
Some concepts of ES
上传七牛云的方法
Conception finale: système distribué de gestion de la santé pour la prévention des épidémies hautement simultanées basé sur vue + socket + redis
Pingcap clinic data acquisition instructions
Load balancer ribbon practice
免签名模板审核的短信验证测试
MySQL takes the union of two query conditions and then queries