
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@galaxy-stack/orbit-database
Advanced tools
Database module for Orbit framework with repository pattern and transaction support
Part of the Orbit framework — a NestJS-style backend framework for Bun.
bun add @galaxy-stack/orbit-database
Module database cho Orbit với Repository pattern, Transaction decorators và tích hợp Drizzle ORM.
pg hoặc postgres drivermysql2 driverimport { DrizzleRepository, Entity, Column, PrimaryGeneratedColumn } from '@galaxy-stack/orbit-database';
@Entity('users')
class User {
@PrimaryGeneratedColumn('increment')
id!: number;
@Column()
name!: string;
@Column({ nullable: true })
email?: string;
}
import { Transactional } from '@galaxy-stack/orbit-database';
class UserService {
@Transactional()
async transferMoney(from: number, to: number, amount: number) {
await this.accountRepo.update(from, { balance: -amount });
await this.accountRepo.update(to, { balance: +amount });
}
}
import { DatabaseModule } from '@galaxy-stack/orbit-database';
@Module({
imports: [
DatabaseModule.forRoot({
type: 'postgres',
url: 'postgresql://user:pass@localhost:5432/mydb',
}),
],
})
class AppModule {}
DatabaseModule.forRoot({
type: 'mysql',
host: 'localhost',
port: 3306,
database: 'mydb',
username: 'root',
password: 'password',
})
DatabaseModule.forRoot({
type: 'sqlite',
database: './data.db', // hoặc ':memory:'
})
DatabaseModule.forRoot({
type: 'mongodb',
url: 'mongodb://localhost:27017/mydb',
})
DatabaseModule.forRootAsync({
inject: [ConfigService],
useFactory: (config: ConfigService) => ({
type: 'postgres',
url: config.get('DATABASE_URL'),
}),
})
const repo = dataSource.getRepository(User);
// CRUD operations
await repo.findAll();
await repo.findOne(1);
await repo.findBy({ name: 'John' });
await repo.create({ name: 'Jane' });
await repo.update(1, { name: 'Updated' });
await repo.delete(1);
await repo.count({ active: true });
Controller → Service → Repository → Drizzle ORM → Database Driver → Database
↓
@Transactional (nếu có)
↓
Transaction wrapper
FAQs
Database module for Orbit framework with repository pattern and transaction support
We found that @galaxy-stack/orbit-database demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.