Skip to content

pfmt/serialkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Oct 24, 2022
de36da1 · Oct 24, 2022

History

5 Commits
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 22, 2022
Oct 17, 2022
Oct 22, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 24, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022
Oct 17, 2022

Repository files navigation

serialkey

Build Status Go Reference

Dynamically named sequences for Go.
Source files are distributed under the BSD-style license.

About

The software is considered to be at a alpha level of readiness, its extremely slow and allocates a lots of memory.

PostgreSQL

Create table make postgresql or cat psql_create_table.sql | sed --expression='s/{{\.Table}}/serialkeys/g'

CREATE TABLE IF NOT EXISTS serialkeys (
    key text primary key,
    value bigint NOT NULL,
    created_at timestamp with time zone NOT NULL DEFAULT now(),
    updated_at timestamp with time zone
);

Benchmark

$ go test -count=1 -race -bench ./...
goos: linux
goarch: amd64
pkg: github.com/pfmt/serialkey
cpu: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
BenchmarkLocalNext/main_test.go:66-8         	 6259942	       200.5 ns/op
BenchmarkPgxNext/main_test.go:66-8           	    2852	    362782 ns/op
PASS
ok  	github.com/pfmt/serialkey	3.031s

About

Dynamically named sequences for Go.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published