Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Library

Comment

Data Access

Web Service

Supported versions

ExpressNode.js application framework
(tick)4.x
MongooseMongoDB access(tick)
5.x
SequelizeNode.js application framework(tick)
5.x; 6.x
TypeORMORM(tick)
0.2.x
FastifyNode.js server
(tick)3.x
AxiosPromise based HTTP client
(tick)0.x
Node-mongodb-nativeMongoDB access(tick)
3.x
nestjsNode.js application framework
(tick)6.x; 7.x
httpsNode.js web service
(tick)
fetchJavaScript builtin web service
(tick)

request-promise

HTTP request client 'request'
(tick)4.x
request-promise-nativeHTTP request client 'request'
(tick)1.x
request-promise-anyHTTP request client 'request'
(tick)1.x
Mongo-clientMongoDB access(error)

CouchdbCouchdb access(error)

Node-couchdbCouchdb access(error)

Couchdb-nanoCouchdb access(error)

MarklogicMarklogic access(error)

my_connectionMySQL access(tick)
0.x
pgPostgreSQL access(tick)
7.x; 8.x
oracledbOracle Database access(tick)
4.x; 5.x

node-sqlserver

MsnodeSQL access(tick)
0.x

mssql

MsSQL access(tick) 
5.x; 6.x
HapiNode.js application framework(error)

SailsNode.js application framework(error)(error)
LoopbackNode.js application framework

(error)

(error)
KoaNode.js application framework(error)

KnexNode.js SQL query builder (error)

MemcachedStorage framework(error)

AWS.DynamoDBAmazon database access(error)

AWS.S3Amazon storage service(tick)
2x
AWS.LambdaAmazon routing solution
(tick)
AWS.SQSAmazon Simple Queue Service
(tick)

...

Expand

The analysis of the following code will create a Node.js Get Operation named /login/{} with a call link from the operation to the handler function f:

Code Block
import * as fastify from 'fastify'

function f(request, reply) {
   reply.send({ hello: 'world' })
}

const server: fastify.FastifyInstance<Server, IncomingMessage, ServerResponse> = fastify({})
// Declare a route
server.get('/login/:name', f)

Image Removed

Supported fastify methods are : get, put, post, delete, route

Known limitations

  • prefix are not supported
  • fastify-mongodb is not supported
'

function f(request, reply) {
   reply.send({ hello: 'world' })
}

const server: fastify.FastifyInstance<Server, IncomingMessage, ServerResponse> = fastify({})
// Declare a route
server.get('/login/:name', f)

Image Added


Supported fastify methods are : get, put, post, delete, route

Known limitations

  • prefix are not supported
  • fastify-mongodb is not supported

More about request-promise, request-promise-native and request-promise-any frameworks

Expand

The analysis of the following code will create a Node.js Post HttpRequest named foo/post/ with a call link from my_func to that request:

Code Block
import * as rp from 'request-promise-native'

function my_post(){
  var options = {
    method: 'POST',
    uri: 'foo/post',
    body: {
        some: 'payload'
    },
    json: true // Automatically stringifies the body to JSON
  };
 
  rp(options)
    .then(function (parsedBody) {
        // POST succeeded...
    })
    .catch(function (err) {
        // POST failed...
    });
}

Image Added


More about axios framework analysis

...

  • Limitations for support of the following frameworks are given in their own section:
  • Use of setters and getters is not supported.
  • Passing directly url strings (or string variables referring to urls) as arguments to web-service calls is supported for many use cases. However passing them through http.RequestOptions (containing metadata) is work in progress.
  • String concatenations using the operator '+' inside loops does not raise violations currently.
  • The cyclomatic complexity number might appear underestimated in callables containing loops with complex conditional expressions.
  • A single production environment file is supported (see corresponding section above).
  • Use of bind method is not supported and would lead to missing callLinks.
  • Use of Object.freeze method is not supported.
  • React Without JSX is not supported.
  • The spread operator "..." is not supported.