
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
promiseland-pg
Advanced tools
a promising connection object and storage module
var Con = require "promiseland-pg";
var con = new Con("postgres://postgres:pwd@localhost/mydb");
console.log(*con.query("select * from mytable"));
var myTableDescription = *con.tableDescription({name: "mytable", schema: "myschema"}); // schema is optional
var myTable = myTableDescription.table; // a node-sql object describing the table
var indexes = myTableDescription.indexes; // array of indexes
var pk = myTableDescription.pk; // the primary keyk
see node-sql for details on the table description objects.
this is one of the advanced and very convenient features. you can provide a node-sql table object to create.
before the table will be created the db is scanned for a existing object of the same name.
if a existing table is found the existing data will be transformed to the new description.
(please only use this feature with productive data when you have a backup)
var sql = con.sql;
var myTable = sql.define({
name: 'myTable',
schema: "public", // optional
columns: [{
name: 'id',
dataType: "integer",
primaryKey: true
}, {
name: 'someval',
dataType: 'char(30)'
}, {
name: 'someotherval',
dataType: 'varchar'
}]
});
*con.createTable({
table: myTable,
indexes: [] // optional
});
Now to the most advanced feature. A promiseland savable storage module is provided. See promiseland savable for details.
a complete promiseland module:
<{ name: "myModule" }>
var Con = require "promiseland-pg";
var con = new Con("postgres://postgres:pwd@localhost/mydb");
promiseland.classSystem.setStorageEngine(con.storageHandler());
class type savable MyClass {
constructor: (var pk){
},
a: 1,
var meta { type: "int" } b: 2,
var c: "some default data",
y: "other default data"
};
MyClass instance1 = *new MyClass("yy"); // load data with pk "yy"
console.log(instance1.c);
instance1.c = "something else";
instance1.b = 4;
*instance1.save();
FAQs
a promising connection object and a storage module
We found that promiseland-pg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.