
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
The aios server is an in java implemeted lightweight server were currently different jdbc datasources can be registered and are accessible throw a socket connection. The exchanged messages an bson en-/decoded.
To use this package you need an aios server up and running.
Sources and documentation for the aios server can be found on https://github.com/thinkbaer/aios.
This is an experimantal implementation under active development don't use it on production systems!
Per default the aios server listens for socket connection on
Setup the server connection
var AiosServer = require('aios');
/**
* Default implementation
*/
var server = new AiosServer({host:'localhost',port:8118});
// Sends the current timestamp and receives server time and duration
var response = server.ping();
/*
resonpse = {
time: DateObject
duration: long
}
*/
Register a JDBC datasource on aios server
// name for the datasource configuration
var dsn = 'hsql_test'
// necassary specification for datasource
var dsSpec = {
type: 'jdbc',
driver: 'org.hsqldb.jdbc.JDBCDriver',
// if the driverLocation is remote then the driver will be downloaded by the server
// a local driver path will be directly used
driverLocation: "http://central.maven.org/maven2/org/hsqldb/hsqldb/2.3.3/hsqldb-2.3.3.jar",
url: "jdbc:hsqldb:file:/tmp/test_server/hsql_test",
user: 'SA',
password: ''
}
// register the datasource on aios server (needed only once)
var dataSource = server.dataSource(dsn, dsSpec);
// if the datasource is already registered, you can access the dataSource Object through
var sameDataSource = server.dataSource(dsn);
Query the registered datasource
var createDBSchema =[
'CREATE TABLE IF NOT EXISTS car ( id INTEGER IDENTITY, type VARCHAR(256), name VARCHAR(256))'
"INSERT INTO car (type, name) VALUES('Ford', 'Mustang')",
"INSERT INTO car (type, name) VALUES('Volkswagen', 'Golf')"
]
// like JDBC executeBatch
// http://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#executeBatch--
var results = ds.executeBatch(createDBSchema);
// like JDBC execute
// http://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#execute--
results = ds.execute("INSERT INTO car (type, name) VALUES('Volvo', 'V70')");
// like JDBC executeUpdate
// http://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#executeUpdate--
results = ds.update("INSERT INTO car (type, name) VALUES('Volvo', 'V70')");
// like JDBC executeQuery
// http://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#executeQuery--
results = ds.query("SELECT * FROM car");
// returns an array with query results
Currently not implemented, coming soon ...
// TODO
aios server
nodejs aios client
FAQs
Socket client for Aios server
The npm package aios receives a total of 50 weekly downloads. As such, aios popularity was classified as not popular.
We found that aios 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.