3.1.0 • Published 1 year ago

node-firebird-driver-native v3.1.0

Weekly downloads
31
License
MIT
Repository
github
Last release
1 year ago

Build Status npm version

Firebird high-level native client for Node.js / TypeScript

node-firebird-driver-native is a modern (Firebird 3+ client, Node.js 10+, TypeScript 2+) native client for Firebird based in the node-firebird-driver API.

Installation

yarn add node-firebird-driver-native

Usage example

import { createNativeClient, getDefaultLibraryFilename } from 'node-firebird-driver-native';


async function test() {
	const client = createNativeClient(getDefaultLibraryFilename());

	const attachment = await client.createDatabase('/tmp/new-db.fdb');
	const transaction = await attachment.startTransaction();

	await attachment.execute(transaction, 'create table t1 (n integer, d date)');
	await transaction.commitRetaining();

	const statement1 = await attachment.prepare(transaction, 'insert into t1 values (?, ?)');
	await statement1.execute(transaction, [1, new Date()]);
	await statement1.execute(transaction, [2, new Date()]);
	await statement1.execute(transaction, [3, new Date()]);
	await statement1.dispose();

	const resultSet = await attachment.executeQuery(transaction, 'select n, d from t1 where n <= ?', [2]);
	const rows = await resultSet.fetch();

	for (const columns of rows)
		console.log(`n: ${columns[0]}, d: ${columns[1]}`);

	await resultSet.close();

	await transaction.commit();
	await attachment.dropDatabase();

	await client.dispose();
}

test().then(() => console.log('Finish...'));

See more examples in packages/node-firebird-driver/src/test directory.

Donation

If this project help you reduce time to develop, you can show your appreciation with a donation.

paypal

BTC: 1Q1W3tLD1xbk81kTeFqobiyrEXcKN1GfHG

3.1.0

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.4.0

2 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

4 years ago

2.0.0

4 years ago

2.0.0-beta.0

4 years ago

1.1.0-beta.1

5 years ago

1.0.1

5 years ago

1.0.1-beta.1

5 years ago

1.0.0

5 years ago

1.0.0-beta.3

5 years ago

1.0.0-beta.2

5 years ago

1.0.0-beta.1

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

6 years ago

0.0.1-beta.3

6 years ago

0.0.1-beta.2

6 years ago

0.0.1-beta.1

6 years ago

0.0.1-alpha.4

7 years ago

0.0.1-alpha.3

7 years ago

0.0.1-alpha.2

7 years ago

0.0.1-alpha.1

7 years ago