Skip to content

Commit

Permalink
lua: bit32
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Mar 19, 2024
1 parent 1fb293b commit 8884d5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions flow/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs v1.0.4
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.2.0
github.com/ClickHouse/clickhouse-go/v2 v2.21.1
github.com/PeerDB-io/gluabit32 v1.0.0
github.com/aws/aws-sdk-go-v2 v1.25.3
github.com/aws/aws-sdk-go-v2/config v1.27.7
github.com/aws/aws-sdk-go-v2/credentials v1.17.7
Expand Down
2 changes: 2 additions & 0 deletions flow/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c h1:RGWPOewvKIROun94nF7v2cua9qP+thov/7M50KEoeSU=
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk=
github.com/PeerDB-io/gluabit32 v1.0.0 h1:jn88j22LqiqDoS47LUnvk29hsFQE6yW0imSsHHiYsV8=
github.com/PeerDB-io/gluabit32 v1.0.0/go.mod h1:tsHStN1XG5uGVWEA8d/RameB7el3PE3sVkvk8e3+FJg=
github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU=
github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
Expand Down
3 changes: 3 additions & 0 deletions flow/pua/peerdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/shopspring/decimal"
"github.com/yuin/gopher-lua"

"github.com/PeerDB-io/gluabit32"
"github.com/PeerDB-io/peer-flow/connectors/utils/catalog"
"github.com/PeerDB-io/peer-flow/model"
"github.com/PeerDB-io/peer-flow/model/qvalue"
Expand All @@ -34,6 +35,8 @@ func RegisterTypes(ls *lua.LState) {
loaders := ls.G.Registry.RawGetString("_LOADERS").(*lua.LTable)
loaders.RawSetInt(2, ls.NewFunction(LoadPeerdbScript))

ls.PreloadModule("bit32", bit32.Loader)

mt := LuaRecord.NewMetatable(ls)
mt.RawSetString("__index", ls.NewFunction(LuaRecordIndex))

Expand Down

0 comments on commit 8884d5f

Please sign in to comment.