Skip to content

Commit

Permalink
mysql truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspercliff committed Nov 26, 2024
1 parent 2415c4e commit de7d76c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 50 deletions.
44 changes: 4 additions & 40 deletions docs/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,10 @@
import DefaultTheme from 'vitepress/theme';
import giscusTalk from 'vitepress-plugin-comment-with-giscus';
import {useData, useRoute} from 'vitepress';
import {toRefs} from "vue";
import NavLinks from "./components/NavLinks.vue";
import Nav from "../../public/components/navigation/Nav.vue";
import CollapsibleSidebar from '../components/CollapsibleSidebar.vue';

export default {
...DefaultTheme,
enhanceApp(ctx) {
DefaultTheme.enhanceApp(ctx);
ctx.app.component('Nav', Nav)
// ...
},
setup() {
// 获取前言和路由
const {frontmatter} = toRefs(useData());
const route = useRoute();

// 评论组件 - https://giscus.app/
giscusTalk({
repo: 'jaspercliff/jaspernote',
repoId: 'R_kgDOMP__ag',
category: 'Q&A', // 默认: `General`
categoryId: 'DIC_kwDOMP__as4CgfD9',
mapping: 'pathname', // 默认: `pathname`
inputPosition: 'top', // 默认: `top`
lang: 'zh-CN', // 默认: `zh-CN`
// i18n 国际化设置(注意:该配置会覆盖 lang 设置的默认语言)
// 配置为一个对象,里面为键值对组:
// [你的 i18n 配置名称]: [对应 Giscus 中的语言包名称]
locales: {
'zh-Hans': 'zh-CN',
'en-US': 'en'
},
homePageShowComment: false, // 首页是否显示评论区,默认为否
lightTheme: 'light', // 默认: `light`
darkTheme: 'transparent_dark', // 默认: `transparent_dark`
// ...
}, {
frontmatter, route
},
true// 是否全部页面启动评论区。可以在页面使用 `comment: true` 前言单独启用
);
enhanceApp({ app }) {
// 注册折叠侧边栏组件
app.component('CollapsibleSidebar', CollapsibleSidebar);
}
};
13 changes: 13 additions & 0 deletions docs/database/mysql/other.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#other



## truncate

TRUNCATE 是一个用于删除表中所有数据的命令,TRUNCATE 不是逐行删除记录,而是直接删除整个表,然后重新创建,因此执行速度更快,占用系统和事务日志资源更少

``` sql
TRUNCATE TABLE table_name;
```

使用 TRUNCATE 会立即永久性地删除表中的所有数据,无法通过事务回滚来恢复
20 changes: 10 additions & 10 deletions docs/public/latestMdFiles.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
"README.md",
"docs/java/basic/String.md",
"docs/java/basic/basic.md",
"docs/java/basic/file.md",
"docs/java/basic/index.md",
"docs/java/framework/spring/core/aop/basic.md",
"docs/java/framework/spring/core/aop/aop.md",
"docs/java/framework/spring/core/aop/index.md",
"docs/java/framework/spring/core/aop/spring.md",
"docs/java/basic/java8/stream/terminal/collect.md"
"docs/java/framework/springmvc/index.md",
"docs/java/devTools/buildTools/gradle/index.md",
"docs/java/devTools/buildTools/maven/index.md",
"docs/java/devTools/index.md",
"docs/java/framework/jpa/index.md",
"docs/java/utils/lombok/import.md",
"docs/java/utils/lombok/index.md",
"docs/java/devTools/buildTools/maven/basic.md",
"docs/java/devTools/buildTools/maven/install.md",
"docs/os/linux/chmod.md"
]

0 comments on commit de7d76c

Please sign in to comment.