必知必会13条 all *** # 取出所有 Book.objects.all().delete() ##删除所有对象 删除数据记录 filter *** # 过滤 Book.objects.filter(pk=1).update(price=190) 修改主键为1的书籍对象,的字段price为19 ...
分类:
数据库 时间:
2020-06-25 23:06:14
阅读次数:
60
1.导入模块包 from django.db import transaction 2.设置回滚点 with transaction.atomic(): save_id = transaction.savepoint() # 设置回滚点 try: order = Order.objects.crea ...
分类:
数据库 时间:
2020-06-25 17:34:22
阅读次数:
115
1.首先明确概念 var:variable,变量。 val:value,值(Kotlin官方文档中称为immutable variable,不可变变量)。 const:常量 2.用法 因为var和val区别很大,所以这里只介绍const的用法。 2.1 语法 const val 常量值的名字 = 常 ...
分类:
其他好文 时间:
2020-06-24 00:30:56
阅读次数:
86
出现问题: impdp 导入时报错sql: impdp xxx/xxx@127.0.0.170/orcl directory=DPDATA dumpfile=20200623data.DMP full=y ; Connected to: Oracle Database 12c Enterprise ...
分类:
数据库 时间:
2020-06-23 15:31:17
阅读次数:
75
ASP.NET's Data Storage Objects Introduction In this brief tutorial, we'll look at five different ASP.NET objects we can use to store data. Two of thes ...
分类:
Web程序 时间:
2020-06-23 15:18:44
阅读次数:
71
转自: https://blog.csdn.net/qq_18975791/article/details/102687125 游标实际上是一种能从包括多条数据记录的结果集中每次提取一条记录的机制。游标充当指针的作用。尽管游标能遍历结果中的所有行,但他一次只指向一行。概括来讲,SQL的游标是一种临时 ...
分类:
数据库 时间:
2020-06-23 13:25:38
阅读次数:
73
比较操作符 __gt 大于__gte 大于等于__lt 小于__lte 小于等于__in__exact 精确等于 like 'aaa'__iexact 精确等于 忽略大小写 ilike 'aaa'__contains 包含 like '%aaa%'__icontains 包含 忽略大小写 ilike ...
分类:
其他好文 时间:
2020-06-21 19:30:52
阅读次数:
52
名称: 原型模式(prototype) 问题: Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype. 解决方案: 1 ...
分类:
其他好文 时间:
2020-06-21 13:42:56
阅读次数:
56
名称: 抽象工厂模式(Abstract Factory Pattern) 问题: Provide an interface for creating families of related or dependent objects without specifying their concrete ...
分类:
其他好文 时间:
2020-06-20 19:16:37
阅读次数:
66
**个人项目所建的表,可根据实际情况更改表数据 ++++++++++++++++存储过程查询分页+++++++++++++++++++++++++++++++++++--if(exists(select * from sys.objects where name='proc_UserShowPage ...
分类:
其他好文 时间:
2020-06-18 21:33:46
阅读次数:
64