sliceOperate

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetListInterIntDiffer

func GetListInterIntDiffer(slice1, slice2 []int64) ([]int64, []int64, []int64)

*

  • @description: 用于计算数据库中和即将要插入数据的交集,两个差集
  • @param {*} slice1 数据库中已存在的数据
  • @param {[]int64} slice2 需要新插入的数据
  • @return {*} []int64 交集,[]int64 slice1中多出来的差集,[]int64 slice2中多出来的差集

func ListContainsAny

func ListContainsAny(list interface{}, sub interface{}) bool

*

  • @description: 判断某个数据存在于某个切片中
  • @param {interface{}} list
  • @param {interface{}} sub
  • @return {*}

func RemoveDuplicateIntElement

func RemoveDuplicateIntElement(silce []int64) []int64

*

  • @description: 数字列表去重
  • @param {[]int64} silce
  • @return {*}

func TranslateSqlInAny

func TranslateSqlInAny(strList interface{}) []string

*

  • @description: 转换列表成string的列表,用于拼接sql的in
  • @param {interface{}} strList
  • @return {*}

Types

This section is empty.

Jump to

Keyboard shortcuts

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