dbs

package
v1.0.51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package dbs 数据库相关.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeID

func DecodeID(id uint64) (uint64, uint64, uint64)

DecodeID id解码.

func ID

func ID() uint64

ID 获取ID.

Example

nolint: testableexamples

package main

import (
	"fmt"

	"github.com/xuender/oils/dbs"
)

func main() {
	fmt.Println(dbs.ID())
	fmt.Println(dbs.ID())
}
Output:

func NewID

func NewID(num uint64) uint64

NewID 新建ID. num 4位 16个. 起始日期 2021-10-31 日. 合计53位,js中使用不会出错.

Example

nolint: testableexamples

package main

import (
	"fmt"

	"github.com/xuender/oils/dbs"
)

func main() {
	fmt.Println(dbs.NewID(3))
	id := dbs.ID()
	fmt.Println(id)
	fmt.Println(dbs.DecodeID(id))
}
Output:

Types

This section is empty.

Directories

Path Synopsis
Package cache 简单的内存缓存.
Package cache 简单的内存缓存.
Package gorms 数据库操作.
Package gorms 数据库操作.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL