• HOME
  • SEARCH
  • TOPICS
  • DATA

  • Next.js 跳转到 not-found.tsx 和 error.tsx 定义的页面

    not-found 跳转到not-found.tsx定义的页面。 使用notFound()方法即可。无需return。 import {notFound} from "next/navigation

    2025-10-15, Views: 16 , Topics: Next.js

  • Node.js Drizzle PostgreSQL 数组类型

    array() text().array()表示text[]。 import {integer, pgTable, text} from "drizzle-orm/pg-core"; const

    2025-10-14, Views: 21 , Topics: Drizzle Node.js

  • Node.js Drizzle PostgreSQL timestamptz 带时区的时间戳类型

    timestamp() timestamp({withTimezone: true}),传入withTimezone属性为true。 import {integer, pgTable, timest

    2025-10-13, Views: 37 , Topics: Drizzle Node.js

  • Node.js Drizzle PostgreSQL bigserial 类型

    bigserial() bigserial("record_page_view_id_seq", {mode: "bigint"}),第一个参数指定序列的名称,第二个参数传入mode属性,指定big

    2025-10-12, Views: 36 , Topics: Drizzle Node.js

  • Node.js Drizzle PostgreSQL bigint 类型

    bigint() bigint({mode: "bigint"}),传入mode属性,指定bigint或number import { bigint, pgTable, timestamp } fr

    2025-10-11, Views: 42 , Topics: Drizzle Node.js

  • Node.js Drizzle orderBy 升序、降序、联合排序

    orderBy() 使用typeof、$inferSelect提取表结构的类型。 升序 orderBy(columnName)等价于orderBy(asc(columnName)) const po

    2025-10-10, Views: 44 , Topics: Drizzle Node.js

  • Node.js Drizzle 查询表结构返回的类型

    $inferSelect 使用typeof、$inferSelect提取表结构的类型。 const posts = pgTable("post", { id: integer().prima

    2025-10-09, Views: 48 , Topics: Drizzle Node.js

  • TypeScript Omit Pick Partial 的用法

    Omit Omit<原类型, 要删除的键>,使用|选择多个键 interface User { name: string, age: number, password: st

    2025-10-08, Views: 60 , Topics: TypeScript

  • TypeScript Record 特性

    说明 类似于JavaScript中的Map。 与Map不同的是: Record遍历时先输出数字类型的字段,再输出字符类型的字段 Map遍历时按放入时的顺序输出。 Record<string, M

    2025-10-07, Views: 62 , Topics: TypeScript

  • TypeScript 配置 script 脚本 CrossOrigin 从 .env 文件读取时报 TS2322 类型不匹配

    原因 .env文件中配置的变量默认是string字符串类型。 TypeScript中script脚本标签中的CrossOrigin属性允许的值是anonymous、use-credentials、"

    2025-10-06, Views: 61 , Topics: TypeScript 跨域

  • Vite 中编辑 vite.conf.ts process 报错

    process 报错 原因:没有安装@types/node类型提示。 npm install @types/node -D 参考文档 https://vite.dev/config/

    2025-10-05, Views: 66 , Topics: Vite Node.js

  • PostgreSQL 按月统计数据

    需求 统计从年初到当前月的每月数据。 如果是历年数据则完整统计1-12月,如果是今年数据则统计1到当前月(如:1-10月)。 generate_series 使用PostgreSQL的内置方法gen

    2025-10-04, Views: 68 , Topics: PostgreSQL

  • CSS 使用 flex-shrink 0 解决 flex 1 布局中元素设置的高度不生效问题

    现象 代码 .container { flex: 1; overflow-y: scroll; } 原因 flex: 1依赖容器高度,没有容器高度,flex: 1会无限拉伸,把元素

    2025-10-03, Views: 74 , Topics: CSS

  • Tailwind CSS 在微信开发者工具中不生效问题

    现象 前端使用了Tailwind4开发网页应用H5,在原生浏览器和手机浏览器都生效,但是在微信开发者工具中,Tailwind的样式都不生效。 原因 Tailwind CSS默认使用了CSS的@lay

    2025-10-02, Views: 92 , Topics: Tailwind CSS

  • Linux watch + PostgreSQL 一行命令实现数据每秒实时监控

    相关命令 Linux中的watch PostgreSQL的psql 命令 watch -n指定间隔执行命令的秒数。 psql -U指定使用哪个数据库的用户。 psql -d指定连接哪个数据库。

    2025-10-01, Views: 92 , Topics: PostgreSQL Linux psql

  • Spring Boot Jackson 创建 JsonNode 对象

    代码 使用ObjectMapper的createObjectNode方法创建对象类型JsonNode,使用createArrayNode方法创建数组类型JsonNode。 ObjectMapper

    2025-09-30, Views: 117 , Topics: Jackson Spring Boot

  • Spring Boot Jackson No serializer found for class

    Spring Boot Jackson No serializer found for class 错误信息 No serializer found for class xxx and no pr

    2025-09-29, Views: 124 , Topics: Jackson Spring Boot

  • Spring Boot MyBatis-Plus setSql() 方法用法

    自定义 SQL 片段 setSql(String setSql, Object... params) boolean success = pointsService.lambdaUpdate()

    2025-09-28, Views: 137 , Topics: MyBatis-Plus Spring Boot

  • Ubuntu PostgreSQL 命令行 Backspace 删除显示 ^H 字符解决方法

    现象 在Ubuntu系统中,使用psql命令进入PostgreSQL的命令行模式,想使用删除键,但显示的确实^H字符。 解决 编辑~/.bashrc文件 vim ~/.bashrc 在最后一行添加

    2025-09-27, Views: 156 , Topics: Ubuntu PostgreSQL

  • PostgreSQL 查看权限及 Access privileges 含义

    \z Access privileges格式为grantee=privileges/grantor,即:被授予权限的角色=具体权限的缩写标识符/授予该权限的角色。 arwdDxt: - a(a

    2025-09-26, Views: 182 , Topics: PostgreSQL

  • Prev
  • 1
  • 2
  • 3
  • 4
  • Next Last

©2025 沪ICP备18012661号-1 阿里云

Messages Sitemap GitHub