package main import ( "fmt" "gorm.io/driver/mysql" "gorm.io/gorm" "time" ) type User struct { ID int Name string CreatedTime time.Time } func main() { ...
分类:
其他好文 时间:
2021-06-04 19:06:12
阅读次数:
0
数据库 库 database 表 table 每个库中可以包含多张表, 必须在库中建表 每个表中,一行数据,称为 记录 每一列数据,称为字段, 每个字段都有自己的类型 数据库本质是一种文件, 有一种专门的工具软件帮助管理数据库, 这种软件被称为RDBMS(关系型数据库管理系统) 关系型数据库: MY ...
分类:
数据库 时间:
2021-06-04 18:56:34
阅读次数:
0
创建表:create table people( id int primary key auto_increment not null, name varchar(10) not null, age int default 18); 创建学生表: create table students(id i ...
分类:
数据库 时间:
2021-06-04 18:53:42
阅读次数:
0
1、sudo xbstream -x -C /data/data_10 < ~/test.xb 2、sudo xtrabackup --decompress --target-dir=/data/data_10 3、sudo xtrabackup --prepare --target-dir=/da ...
分类:
数据库 时间:
2021-06-04 18:45:14
阅读次数:
0
1、下载pdi-ce-9.0.0.0-423.zip并解压 2、windows下运行Spoon.bat 3、界面如下 4、转换上右键-新建-保存,另存为,然后关闭再打开就是打开的新建的文件 5、DB连接-新建 出现问题如下: Driver class 'org.gjt.mm.mysql.Driver ...
分类:
数据库 时间:
2021-06-03 18:16:41
阅读次数:
0
存储引擎决定了表的存储方式, 查看当前使用的存储引擎 1.show create table 表名 2.show engines 建表的时候可以指定存储引擎和字符集 存储引擎这个名字只在mysql中存在。(oracle中没有特殊的名字,就叫表的存储方式) MyISAM:采用三个文件来存储一张表(表结 ...
分类:
其他好文 时间:
2021-06-03 18:10:29
阅读次数:
0
views.py视图导入 from django.shortcuts import HttpResponse, render, redirect 1.HttpResponse 它是作用是内部传入一个字符串参数,然后发给浏览器。 例如: def index(request):# 业务逻辑代码 retu ...
分类:
Web程序 时间:
2021-06-03 18:03:57
阅读次数:
0
1、数据库环境搭建时,必须提前规划好服务器的配置与数量,包括服务器的数据量,操作系统,网络,IP需求等 2、Sqlserver的标准化安装 C:System,D:App,E:Data,F:log,G:Backup,H:tempdb H盘解释:SQL Server自带的数据库 原因:分盘装载数据,能提 ...
分类:
数据库 时间:
2021-06-03 17:57:47
阅读次数:
0
情景: 用户发起request,并等待response返回。在本些views中,可能需要执行一段耗时的程序,那么用户就会等待很长时间,造成不好的用户体验,比如发送邮件、手机验证码等。 使用celery后,情况就不一样了。 解决: 将耗时的程序放到celery中执行。 Celery 是一个包含一系列的 ...
分类:
其他好文 时间:
2021-06-03 17:55:31
阅读次数:
0
一、连接数据库: dsn := "root:123456@tcp(127.0.0.1:3306)/more?charset=utf8mb4&parseTime=True&loc=Local" db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{}) ...
分类:
数据库 时间:
2021-06-03 17:50:45
阅读次数:
0