Skip to content

Commit

Permalink
Node 20, lint, clean unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
kernoeb committed Nov 25, 2024
1 parent 115a665 commit ef47fe0
Show file tree
Hide file tree
Showing 48 changed files with 3,439 additions and 4,415 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLinters/eslint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/node-informixdb.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed build.zip
Binary file not shown.
14 changes: 14 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const pluginJs = require("@eslint/js");
const globals = require("globals")

/** @type {import('eslint').Linter.Config[]} */
module.exports = [{
files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}
}, {
languageOptions: {globals: globals.node}
}, pluginJs.configs.recommended, {
rules: {
'no-unused-vars': 'off',
'no-empty': 'off'
}
}];
2 changes: 1 addition & 1 deletion examples/SampleApp1.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function DoSomeWork(err, conn)
var rows = conn.querySync("SELECT * FROM t1");
console.log();
console.log(rows);
};
}


var MyAsynchronousTask = function (err, conn)
Expand Down
30 changes: 15 additions & 15 deletions examples/SampleApp2.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function DirExec( conn, ErrIgn, sql )
var result = conn.querySync( sql );
console.log( sql );
}
catch (e)
catch (e)
{
console.log( "--- " + sql );
if( ErrIgn != 1 )
Expand Down Expand Up @@ -124,11 +124,11 @@ function DoSomePrepareExec(conn)

function DoSomeWork(err, conn)
{
if (err)
if (err)
{
return console.log(err);
}

DirExec( conn, 1, "drop table t1" );
DirExec( conn, 0, "create table t1 ( c1 int, c2 char(20) ) " );
DirExec( conn, 0, "insert into t1 values( 1, 'val-1' )" );
Expand All @@ -143,8 +143,8 @@ function DoSomeWork(err, conn)
/*
//var stmt = conn.prepareSync("insert into t1 (c1, c2) VALUES (?, ?)");
//Bind and Execute the statment asynchronously
stmt.execute([ 6, 'BindVal-6'],
function (err, result)
stmt.execute([ 6, 'BindVal-6'],
function (err, result)
{
result.closeSync();
Expand All @@ -157,7 +157,7 @@ function DoSomeWork(err, conn)
var rows = conn.querySync( "SELECT * FROM t1" );
console.log();
console.log(rows);
};
}


var MyAsynchronousTask = function (err, conn)
Expand All @@ -181,38 +181,38 @@ function informixdb_OpenSync(ConStr)
console.log();
console.log(" --- Executing informixdb.openSync() ...." );
var conn;
try
try
{
conn = dbobj.openSync(ConStr);
}
catch(e)
catch(e)
{
console.log(e);
return;
}

DoSomeWork(0, conn);
try

try
{
//dbobj.closeSync();
conn.closeSync();
}
catch(e)
catch(e)
{
console.log(e);
}
console.log(" --- End informixdb.openSync()" );
}

function main_func()
function main_func()
{
//// Make sure the port is IDS SQLI port.
var ConnectionString = "SERVER=ids0;DATABASE=db1;HOST=127.0.0.1;SERVICE=9088;PROTOCOL=onsoctcp;UID=informix;PWD=xxxx;";

//Synchronous Execution
//Synchronous Execution
informixdb_OpenSync(ConnectionString);

//Asynchronous Execution
//informixdb_Open(ConnectionString);
}
Expand Down
Loading

0 comments on commit ef47fe0

Please sign in to comment.