Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Ever wanted to populate a postgres db with tons of fake data? Well, barreller does that.
Ever wanted to populate a postgres db with tons of fake data? Well, barreller does that.
Barreller prescribes a way to define your tables, column values, and relationships, and then import infinite data into postgres.
Inspiration came from wanting to create lots of fake data, but being constained by maintaining the relationships between that data. Especially when sometimes those relationships depend on server-side generated primary keys.
As of this writing - very much a Work In Progress... But it does work!
// define the type for the table
type Food = {
foodId: string;
calories: number;
}
// define columns
const foodColumnId: ColumnDefinition<FoodTable, 'foodId'> = {
// name equals the table's column name
name: 'food_id',
// prop is optional and will be the key used when generating the data locally
prop: 'foodId',
// value can be a constant (i.e. a string, number, void, date, etc.)
// or it can be a function and is invoked each time a row is generated
value() { return faker.random.word(); }
};
const foodColumnCalories: ColumnDefinition<FoodTable, 'calories'> = {
name: 'calories',
value: 100
};
const foodColumns: ColumnDefinitions<FoodTable> = [
foodColumnId,
foodColumnCalories
];
const barrel = new Barrel({ pgConnectionObject });
// 'food' is the table name and it is also the string used to generate rows
barrel.addTable('food', foodColumns);
// this queues up the data to be inserted, but does NOT insert it
barrel.generateRow('food');
// inserts any queued up data. This is an async function.
barrel.insert();
generatedKey(tableName, columnName)
for server generated private keys.batch.insertFunction
as a deferred promise objectFAQs
Ever wanted to populate a postgres db with tons of fake data? Well, barreller does that.
We found that barreller 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.