sql

package
v0.0.0-...-533b673 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bloom

type Bloom struct {
	Id  string `gorm:"primarykey;size:50"`
	Val []byte
}

type SQLFilter

type SQLFilter struct {
	memory.Filter
	// contains filtered or unexported fields
}

Memory based filter. Save data to database when use 'Write' function. 基于内存的过滤器。使用'Write'方法时上传结果到数据库。

func (*SQLFilter) Clear

func (f *SQLFilter) Clear() error

Delete the related row. 删除相关行

func (*SQLFilter) Close

func (f *SQLFilter) Close() error

func (*SQLFilter) CreateTable

func (f *SQLFilter) CreateTable() error

func (*SQLFilter) Init

func (f *SQLFilter) Init(db *gorm.DB, tableName string, key string, bytes []byte) error

Initial the filter. If the table does not exist in the database, it will be automatically created. 初始化过滤器。如果数据库中没有相应的表,将会被自动创建。

func (*SQLFilter) Write

func (f *SQLFilter) Write() error

Jump to

Keyboard shortcuts

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