Node操作Firebird 互动版

在线工具推荐: Three.js AI纹理开发包 - YOLO合成数据生成器 - GLTF/GLB在线编辑 - 3D模型格式在线转换 - 可编程3D场景编辑器

detach

db.detach()为关闭数据库连接,如下实例代码:

FireBird.attach(options, function(err, db) {
    if (err)
        throw err;
    db.query('SELECT * FROM a', function(err, result) {
            if (err)
            throw err;
        // IMPORTANT: close the connection
        db.detach();
    });
});