
Security News
Insecure Agents Podcast: How to Keep AI Agents From Bypassing Security Controls
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.
@galaxy-stack/orbit-database
Advanced tools
Database module for Orbit framework with repository pattern and transaction support
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
The npm package @galaxy-stack/orbit-database receives a total of 261 weekly downloads. As such, @galaxy-stack/orbit-database popularity was classified as not popular.
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.

Security News
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.

Security News
GPT-6 Astra tried to plant malicious code in simulated open source projects using fake GitHub accounts and deceptive PRs during an assigned CTF challenge.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.