data

package
v0.0.0-...-36249bc Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Overview

Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

github.com/donnie4w/tim

Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

github.com/donnie4w/tim

Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

github.com/donnie4w/tim

Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

github.com/donnie4w/tim

Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

github.com/donnie4w/tim

Index

Constants

This section is empty.

Variables

View Source
var Handler engine
View Source
var M_dbname = fmt.Sprint(CRC64(Int64ToBytes(RandId() + 5)))
View Source
var M_host = fmt.Sprint(CRC64(Int64ToBytes(RandId() + 3)))
View Source
var M_port = fmt.Sprint(CRC64(Int64ToBytes(RandId() + 4)))
View Source
var M_pwd = fmt.Sprint(CRC64(Int64ToBytes(RandId() + 2)))
View Source
var M_user = fmt.Sprint(CRC64(Int64ToBytes(RandId() + 1)))

Functions

func Create

func Create[T any]() (err error)

func Delete

func Delete[T any](tid uint64, id int64) (err error)

update data for non nil

func Init

func Init() (err error)

func Insert

func Insert(a timstruct) (seq int64, err error)

func SelectAllByIdx

func SelectAllByIdx[T any](columnName string, columnValue uint64) (as []*T, err error)

func SelectAllByIdxWithTid

func SelectAllByIdxWithTid[T any](tid uint64, columnName string, columnValue uint64) (as []*T, err error)

func SelectById

func SelectById[T timstruct](tid uint64, id int64) (a *T, err error)

func SelectByIdx

func SelectByIdx[T any](columnName string, columnValue uint64) (a *T, err error)

func SelectByIdxDescLimit

func SelectByIdxDescLimit[T any](id, limit int64, columnName string, columnValue uint64) (as []*T, err error)

func SelectByIdxLimit

func SelectByIdxLimit[T any](startId, limit int64, columnName string, columnValue uint64) (as []*T, err error)

func SelectByIdxWithTid

func SelectByIdxWithTid[T any](tid uint64, columnName string, columnValue uint64) (a *T, err error)

func SelectIdByIdx

func SelectIdByIdx[T timstruct](columnName string, columnValue uint64) (id int64, err error)

func SelectIdByIdxSeq

func SelectIdByIdxSeq[T any](columnName string, columnValue uint64, id int64) (_r int64, err error)

func UpdateNonzero

func UpdateNonzero(a timstruct) (err error)

update data for non zero

Types

type OfflineBean

type OfflineBean struct {
	Id     int64
	Mid    int64
	Stanze []byte
}

Jump to

Keyboard shortcuts

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