
Security News
Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Music Scraping
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.
FlexiDB, verilerinizi farklı formatlarda depolamak ve yönetmek için esnek bir Node.js modülüdür. Bu modül sayesinde JSON, MySQL, BSON ve YAML gibi veritabanı formatlarını destekleyerek projenize uygun veri depolama seçenekleri sunar.
const {FlexiDB} = require('flexidb');
// Örnek kullanım
const db = new FlexiDB('mydata.json', 'json');
/**
BSON formatında veritabanı
const dbBson = new FlexiDB('mydata.bson', 'bson');
**/
/**
YAML formatında veritabanı
const dbYaml = new FlexiDB('mydata.yaml', 'yaml');
**/
/**
Mysql formatında veritabanı
const mysql = require('mysql'); // flexidb nin hemen altına yapıştırcan
const config = {
host: 'localhost', // MySQL sunucusunun adresi
port: 3306, // Bağlantı noktası
user: 'kullaniciadi', // MySQL kullanıcı adı
password: 'sifre', // MySQL kullanıcı şifresi
database: 'veritabani', // Bağlanmak istediğiniz veritabanının adı
};
const connection = mysql.createConnection(config);
connection.connect((err) => {
if (err) {
console.error('Bağlantı hatası:', err);
} else {
console.log('MySQL sunucusuna bağlandı!');
// Bağlantı başarılı bir şekilde kurulduğunda burada işlemlerinizi yapabilirsiniz.
}
});
**/
// Veri oluşturma
db.create('name', 'Luppux');
db.create('age', 25);
// Veri okuma
console.log(db.read('name')); //
// Veri güncelleme
db.update('age', 30);
console.log(db.read('age')); // 30
// Veri silme
db.delete('age');
console.log(db.read('age')); // undefined
// Veri sorgulama
const results = db.query((key, value) => value.includes('J'));
console.log(results); // [['name', 'Luppux']]
// MySQL bağlantısı kapatma
db.closeConnection();
// İndeksleme
db.createIndex('name');
const indexValues = db.getIndexValues();
console.log(indexValues); // ['Luppux']
// Transaksiyonlar
db.startTransaction();
db.set('name', 'Luppux');
db.set('age', 35);
db.commitTransaction();
console.log(db.read('name')); // Jane Smith
console.log(db.read('age')); // 35
// Veritabanı yedekleme ve geri yükleme
db.backup('backup.json');
db.restore('backup.json');
console.log(db.read('name')); // Luppux
// Diğer işlemler
db.createCollection('users'); // Yeni bir koleksiyon oluşturur
db.insert('users', { name: 'Alice', age: 30 }); // Koleksiyona yeni bir belge ekler
db.find('users', { age: { $gt: 25 } }); // Belirli bir koşula göre belgeleri bulur
db.updateOne('users', { name: 'Alice' }, { $set: { age: 31 } }); // Belirli bir belgeyi günceller
db.deleteOne('users', { name: 'Alice' }); // Belirli bir belgeyi siler
db.aggregate('users', [{ $group: { _id: '$age', count: { $sum: 1 } } }]); // Agregasyon işlemi yapar
// ...
npm install flexidb
veya
yarn add flexidb
Daha fazla bilgi için GitHub sayfamızı !ziyaret edebilirsiniz.
FAQs
Créated By Weatrix
The npm package flexidb receives a total of 0 weekly downloads. As such, flexidb popularity was classified as not popular.
We found that flexidb 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
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.