Skip to content

Database Format for the open() Method

Ophir LOJKINE edited this page Jun 12, 2014 · 3 revisions

Introduction

To open an existing database you must supply the new SQL.Database() method with an array of integers where each integer represents a byte of the database file.

Conversion from binary string to byte array

If you have a binary string representing your database, you can convert it to an array of bytes:

    function bin2Array(bin) {
        'use strict';
        var i, size = bin.length, ary = [];
        for (i = 0; i < size; i++) {
            ary.push(bin.charCodeAt(i) & 0xFF);
        }
        return ary;
    }
Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy