dbutil

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const FullTextIndex = "fts_search_index"

FullTextIndex is full text search index

Variables

This section is empty.

Functions

func CreateFullTextIndex

func CreateFullTextIndex(db *gorm.DB, tableName string, columns ...string) error

CreateFullTextIndex creates a full-text index

func DropFullTextIndex

func DropFullTextIndex(db *gorm.DB, tableName string) error

DropFullTextIndex drops a full-text index

func IsDuplicate

func IsDuplicate(err error) bool

IsDuplicate checks whether error returned from db is as a result of violating unique constraint

func ParseQuery

func ParseQuery(query string, stopWords ...string) string

ParseQuery parses a random query to a full-text query

Types

This section is empty.

Jump to

Keyboard shortcuts

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