
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
github.com/yokomotod/go-zetasqlite
A database driver library that interprets ZetaSQL queries and runs them using SQLite3
go-zetasqlite
supports database/sql
driver interface.
So, you can use ZetaSQL queries just by importing github.com/goccy/go-zetasqlite
.
Also, go-zetasqlite uses SQLite3 as the database engine.
Since we are using go-sqlite3, we can use the options ( like :memory:
) supported by go-sqlite3
( see details ).
ZetaSQL functionality is provided by go-zetasql
go get github.com/goccy/go-zetasqlite
Since this library uses go-zetasql, the following environment variables must be enabled in order to build. See here for details.
CGO_ENABLED=1
CXX=clang++
You can pass ZetaSQL queries to Query/Exec function of database/sql package.
package main
import (
"database/sql"
"fmt"
_ "github.com/goccy/go-zetasqlite"
)
func main() {
db, err := sql.Open("zetasqlite", ":memory:")
if err != nil {
panic(err)
}
defer db.Close()
rows, err := db.Query(`SELECT * FROM UNNEST([?, ?, ?])`, 1, 2, 3)
if err != nil {
panic(err)
}
var ids []int64
for rows.Next() {
var id int64
if err := rows.Scan(&id); err != nil {
panic(err)
}
ids = append(ids, id)
}
fmt.Println(ids) // [1 2 3]
}
A list of ZetaSQL specifications and features supported by go-zetasqlite.
INT
, SMALLINT
, INTEGER
, BIGINT
, TINYINT
, BYTEINT
)DECIMAL
)BIGDECIMAL
)FLOAT
)BOOLEAN
)+
, -
, ~
)*
)/
)||
)+
)-
)<<
, >>
, &
, |
)=
, <
, >
, <=
, >=
, !=
, <>
)Not suported yet
MIT
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.