I once wrote about authenticating users using database tables and JWTs. While functional, custom solutions like that put the onus on you to protect the user’s credentials and they’re a far cry from a full-blown platform for security and identity. Oracle’s ... more
While the buffer APIs are easier to use to upload and download files, the streaming APIs are a great way to better manage memory and concurrency. In this post, you’ll learn how to stream files between clients, Node.js, and Oracle Database. Please Note: ... more
Of the various ways to transfer files to and from Oracle Database, buffering in Node.js is the easiest to implement. In this post, you’ll learn how to perform file uploads and downloads using buffered binds and fetches. Please Note: This post is part ... more
I first wrote about uploading and downloading files in 2015. Since then, many new features have been added to the driver, including streaming and buffer APIs for working with LOBs. It’s time to revisit the topic and put these new APIs to use. In this ... more
In the last post in this series, I demonstrated how powerful functions added to the SQL engine in Oracle Database 12.2 allow you to generate JSON with ease. But what if you were doing something sufficiently complex that it required the procedural capabilities ... more
Oracle started adding JSON support to Oracle Database with version 12.1.0.2. The earliest support was targeted at storing, indexing, and querying JSON data. Version 12.2 rounded out that support by adding features for generating, exploring, and processing ... more
I previously demonstrated a manual approach to adding pagination, sorting, and filtering capabilities to a REST API. In this post, I’ll show you how to use a module to simplify and standardize these operations. Please Note: This post is part of a series ... more
At this point in the series, the REST API supports basic CRUD capabilities on the employees endpoint. However, clients often need some control over how multiple records are fetched from the database. In this post, you’ll make the API more flexible by ... more
In the last post, you added logic to the API for GET requests which retrieved data from the database. In this post, you will finish building out the basic CRUD functionality of the API by adding logic to handle POST, PUT, and DELETE requests on the employees ... more
After taking a brief detour to create a generic database module, it’s time to continue on with the development of the high-level components discussed in the parent post. In this post, you will add routing, controller, and database logic to handle an ... more
With the web server in place, it’s time to look into some database basics. As mentioned in the parent post, this series will use the Oracle Database driver/API for Node.js (node-oracledb) to interact with the database. In this post, you’ll create a module ... more
The web server is one of the most important components of a REST API. In this post, you will start your REST API project by creating some initial directories and files. Then you’ll create a web server module and wire things up so that the web server ... more
Node.js and REST APIs go hand in hand. In fact, Ryan Dahl (the creator of Node.js) once described the focus of Node.js as “doing networking correctly”. But where should you start when building a REST API with Node.js? What components should be used and ... more
Two of my favorite Oracle Cloud services are the Exadata Express Cloud Service (Exadata Express) and the Application Container Cloud Service (ACCS). Exadata Express is a fully managed Oracle Database service at an entry-level price point for small to ... more
So far in this async series we’ve covered Node.js style callbacks, the Async module, and promises. In this final part of the series, we’ll learn about async functions (a.k.a. async/await). To me, async functions are the most exciting thing to happen ... more
The first two patterns we looked at in this series were Node.js callbacks and the Async module. While effective, those patterns are not the only ways of writing asynchronous code. Patterns built around concepts such as “deferreds” and “promises” were ... more
The first pattern we looked at in this series was the Node.js callback pattern. As I mentioned there, that pattern alone will only get you so far. Eventually, you’ll want to construct asynchronous workflows that process elements in a collection serially ... more
Callback functions have been around since the early days of JavaScript, but there have never been any standards for using them. How should callbacks be passed into async APIs? How should errors that occur during async processing be handled? A lack of ... more
It seems simple enough: get a connection to the database, use it to do some work, then close it when you’re done. But due to the asynchronous nature of Node.js, coding this sequence isn’t as straightforward as it seems. There are lots of options for ... more
With Oracle Database 12.2 now available and Node.js 8 just around the corner, this is a great time to create a local sandbox for learning. Thanks to some prebuilt VMs provided by Oracle, you can have such an environment up and running in less than 20 ... more
Oracle JET, Oracle’s JavaScript toolkit for single page apps, includes over 80 components to help build enterprise JavaScript applications. But one thing JET doesn’t include is a set of icons – the argument being that different apps and teams will likely ... more
The current version of the Node.js driver (v1.12) doesn’t support binding record types directly. Does that mean you can’t invoke stored procedures and functions that use record types? Of course not! For now, you just have to decompose the record types ... more
Oracle REST Data Services (ORDS) allows developers to create REST interfaces to Oracle Database, Oracle Database 12c JSON Document Store, and Oracle NoSQL Database as quickly and easily as possible. When working with Oracle Database, developers can use ... more
Node.js is an excellent platform for creating RESTful APIs that store and retrieve data using Oracle Database. node-oracledb is the driver maintained by Oracle that allows Node.js developers to connect to and utilize the database. As data crosses the ... more
When I wrote a series of posts on creating JSON from relational data, I mentioned that dates could be tricky. That was a bit of an understatement. Dates, and the time zone conversions that often go along with them, can be outright daunting! In this series, ... more
We added a new JavaScript layer in the last release of the Node.js driver for Oracle Database. It added just one feature (connection request queueing) and didn’t include any API changes. However, there are currently two features being worked on that ... more