respcmd

package
v0.0.0-...-110c355 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendCommand

func AppendCommand(s *resp.Session) error

func AuthCommand

func AuthCommand(s *resp.Session) error

func BitCountCommand

func BitCountCommand(s *resp.Session) error

func BitPosCommand

func BitPosCommand(s *resp.Session) error

func CommandCommand

func CommandCommand(s *resp.Session) error

func DecrCommand

func DecrCommand(s *resp.Session) error

func DecrbyCommand

func DecrbyCommand(s *resp.Session) error

func DelCommand

func DelCommand(s *resp.Session) error

func DiscardCommand

func DiscardCommand(s *resp.Session) error

func EchoCommand

func EchoCommand(s *resp.Session) error

func EvalCommand

func EvalCommand(s *resp.Session) error

func EvalshaCommand

func EvalshaCommand(s *resp.Session) error

func ExecCommand

func ExecCommand(s *resp.Session) error

func ExistsCommand

func ExistsCommand(s *resp.Session) error

func ExpireAtCommand

func ExpireAtCommand(s *resp.Session) error

func ExpireCommand

func ExpireCommand(s *resp.Session) error

func GeoAddCommand

func GeoAddCommand(s *resp.Session) error

func GeoDistCommand

func GeoDistCommand(s *resp.Session) error

func GeoHashCommand

func GeoHashCommand(s *resp.Session) error

func GeoPosCommand

func GeoPosCommand(s *resp.Session) error

func GeoRadiusByMemberCommand

func GeoRadiusByMemberCommand(s *resp.Session) error

func GeoRadiusCommand

func GeoRadiusCommand(s *resp.Session) error

func GetBitCommand

func GetBitCommand(s *resp.Session) error

func GetCommand

func GetCommand(s *resp.Session) error

func GetRangeCommand

func GetRangeCommand(s *resp.Session) error

func GetSetCommand

func GetSetCommand(s *resp.Session) error

func HClearCommand

func HClearCommand(s *resp.Session) error

func HExpireCommand

func HExpireCommand(s *resp.Session) error

func HExpireatCommand

func HExpireatCommand(s *resp.Session) error

func HKeyExistsCommand

func HKeyExistsCommand(s *resp.Session) error

func HPersistCommand

func HPersistCommand(s *resp.Session) error

func HTtlCommand

func HTtlCommand(s *resp.Session) error

func HdelCommand

func HdelCommand(s *resp.Session) error

func HexistsCommand

func HexistsCommand(s *resp.Session) error

func HgetCommand

func HgetCommand(s *resp.Session) error

func HgetallCommand

func HgetallCommand(s *resp.Session) error

func HincrbyCommand

func HincrbyCommand(s *resp.Session) error

func HkeysCommand

func HkeysCommand(s *resp.Session) error

func HlenCommand

func HlenCommand(s *resp.Session) error

func HmgetCommand

func HmgetCommand(s *resp.Session) error

func HmsetCommand

func HmsetCommand(s *resp.Session) error

func HsetCommand

func HsetCommand(s *resp.Session) error

func HvalsCommand

func HvalsCommand(s *resp.Session) error

func IncrByFloatCommand

func IncrByFloatCommand(s *resp.Session) error

func IncrCommand

func IncrCommand(s *resp.Session) error

func IncrbyCommand

func IncrbyCommand(s *resp.Session) error

func InfoCommand

func InfoCommand(s *resp.Session) error

func KDelCommand

func KDelCommand(s *resp.Session) error

func KExistsCommand

func KExistsCommand(s *resp.Session) error

func KExpireAtCommand

func KExpireAtCommand(s *resp.Session) error

func KExpireCommand

func KExpireCommand(s *resp.Session) error

func KPersistCommand

func KPersistCommand(s *resp.Session) error

func KTtlCommand

func KTtlCommand(s *resp.Session) error

func LClearCommand

func LClearCommand(s *resp.Session) error

func LExpireCommand

func LExpireCommand(s *resp.Session) error

func LExpireatCommand

func LExpireatCommand(s *resp.Session) error

func LKeyExistsCommand

func LKeyExistsCommand(s *resp.Session) error

func LPersistCommand

func LPersistCommand(s *resp.Session) error

func LPushXCommand

func LPushXCommand(s *resp.Session) error

func LTrimBackCommand

func LTrimBackCommand(s *resp.Session) error

func LTrimCommand

func LTrimCommand(s *resp.Session) error

func LTrimFrontCommand

func LTrimFrontCommand(s *resp.Session) error

func LTtlCommand

func LTtlCommand(s *resp.Session) error

func LindexCommand

func LindexCommand(s *resp.Session) error

func LinsertCommand

func LinsertCommand(s *resp.Session) error

func LlenCommand

func LlenCommand(s *resp.Session) error

func LpopCommand

func LpopCommand(s *resp.Session) error

func LpushCommand

func LpushCommand(s *resp.Session) error

func LrangeCommand

func LrangeCommand(s *resp.Session) error

func LremCommand

func LremCommand(s *resp.Session) error

func LsetCommand

func LsetCommand(s *resp.Session) error

func MSetCommand

func MSetCommand(s *resp.Session) error

func MgetCommand

func MgetCommand(s *resp.Session) error

func MultiCommand

func MultiCommand(s *resp.Session) error

func PExpireAtCommand

func PExpireAtCommand(s *resp.Session) error

func PExpireCommand

func PExpireCommand(s *resp.Session) error

func PKSETEXATCommand

func PKSETEXATCommand(s *resp.Session) error

func PSetExCommand

func PSetExCommand(s *resp.Session) error

func PTtlCommand

func PTtlCommand(s *resp.Session) error

func PersistCommand

func PersistCommand(s *resp.Session) error

func PingCommand

func PingCommand(s *resp.Session) error

func RPushXCommand

func RPushXCommand(s *resp.Session) error

func RpopCommand

func RpopCommand(s *resp.Session) error

func RpushCommand

func RpushCommand(s *resp.Session) error

func SClearCommand

func SClearCommand(s *resp.Session) error

func SExpireCommand

func SExpireCommand(s *resp.Session) error

func SExpireatCommand

func SExpireatCommand(s *resp.Session) error

func SKeyExistsCommand

func SKeyExistsCommand(s *resp.Session) error

func SPersistCommand

func SPersistCommand(s *resp.Session) error

func SRandMemberCommand

func SRandMemberCommand(s *resp.Session) error

func STtlCommand

func STtlCommand(s *resp.Session) error

func SaddCommand

func SaddCommand(s *resp.Session) error

func ScardCommand

func ScardCommand(s *resp.Session) error

func ScriptCommand

func ScriptCommand(s *resp.Session) error

func SelectCommand

func SelectCommand(s *resp.Session) error

func SetBitCommand

func SetBitCommand(s *resp.Session) error

func SetCommand

func SetCommand(s *resp.Session) error

func SetExCommand

func SetExCommand(s *resp.Session) error

func SetNxCommand

func SetNxCommand(s *resp.Session) error

func SetRangeCommand

func SetRangeCommand(s *resp.Session) error

func ShutdownCommand

func ShutdownCommand(s *resp.Session) error

func SismemberCommand

func SismemberCommand(s *resp.Session) error

func SmembersCommand

func SmembersCommand(s *resp.Session) error

func SpopCommand

func SpopCommand(s *resp.Session) error

func SremCommand

func SremCommand(s *resp.Session) error

func StrLenCommand

func StrLenCommand(s *resp.Session) error

func TtlCommand

func TtlCommand(s *resp.Session) error

func TypeCommand

func TypeCommand(s *resp.Session) error

func UnwatchCommand

func UnwatchCommand(s *resp.Session) error

func WatchCommand

func WatchCommand(s *resp.Session) error

func ZClearCommand

func ZClearCommand(s *resp.Session) error

func ZExpireCommand

func ZExpireCommand(s *resp.Session) error

func ZExpireatCommand

func ZExpireatCommand(s *resp.Session) error

func ZKeyExistsCommand

func ZKeyExistsCommand(s *resp.Session) error

func ZPersistCommand

func ZPersistCommand(s *resp.Session) error

func ZRangeByLexCommand

func ZRangeByLexCommand(s *resp.Session) error

func ZTtlCommand

func ZTtlCommand(s *resp.Session) error

func ZaddCommand

func ZaddCommand(s *resp.Session) error

func ZcardCommand

func ZcardCommand(s *resp.Session) error

func ZcountCommand

func ZcountCommand(s *resp.Session) error

func ZincrbyCommand

func ZincrbyCommand(s *resp.Session) error

func ZlexcountCommand

func ZlexcountCommand(s *resp.Session) error

func ZrangeCommand

func ZrangeCommand(s *resp.Session) error

func ZrangebyscoreCommand

func ZrangebyscoreCommand(s *resp.Session) error

func ZrangebyscoreGeneric

func ZrangebyscoreGeneric(s *resp.Session, reverse bool) error

func ZrankCommand

func ZrankCommand(s *resp.Session) error

func ZremCommand

func ZremCommand(s *resp.Session) error

func ZremrangebylexCommand

func ZremrangebylexCommand(s *resp.Session) error
func zrangebylexCommand(c *session) error {
	args := s.Args
	if len(args) != 3 && len(args) != 6 {
		return CmdParamsErr
	}

	min, max, rangeType, err := zparseMemberRange(args[1], args[2])
	if err != nil {
		return err
	}

	var offset int = 0
	var count int = -1

	if len(args) == 6 {
		if strings.ToLower(unsafe2.String(args[3])) != "limit" {
			return SyntaxErr
		}

		if offset, err = strconv.Atoi(unsafe2.String(args[4])); err != nil {
			return ValueErr
		}

		if count, err = strconv.Atoi(unsafe2.String(args[5])); err != nil {
			return ValueErr
		}
	}

	key := args[0]
	if ay, err := proxyClient.ZRangeByLex(key, min, max, rangeType, offset, count); err != nil {
		return err
	} else {
		s.RespWriter.WriteSliceArray(ay)
	}

	return nil
}

func ZremrangebyrankCommand

func ZremrangebyrankCommand(s *resp.Session) error

func ZremrangebyscoreCommand

func ZremrangebyscoreCommand(s *resp.Session) error

func ZrevrangeCommand

func ZrevrangeCommand(s *resp.Session) error

func ZrevrangebyscoreCommand

func ZrevrangebyscoreCommand(s *resp.Session) error

func ZrevrankCommand

func ZrevrankCommand(s *resp.Session) error

func ZscoreCommand

func ZscoreCommand(s *resp.Session) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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