Tag: javascript

From N1QL to JavaScript and Back – Part 3: Iterating over Documents and DML

From N1QL to JavaScript and Back – Part 3: Iterating over Documents and DML

This earlier blog goes through the basics of executing N1QL statements inside JavaScript functions. We now move onto… Iterators/Processing values So far we have purposely avoided statements that return data, and returning data from the function. This is where we...

From N1QL to JavaScript and Back – Part 2: Basic Usage

From N1QL to JavaScript and Back – Part 2: Basic Usage

The previous blog introduced to you new features in JavaScript user-defined functions. We are now going to explore them in more detail. We start with a basic mechanism to execute N1QL statements inside JavaScript code. N1QL in JavaScript There are...

From N1QL to Javascript and Back – Part 1: Introduction

From N1QL to Javascript and Back – Part 1: Introduction

Among the many great features introduced in Couchbase Server 7.0, one has the potential for a greater impact in later releases: N1QL User Defined Functions. A quick glance at the past N1QL is a declarative language, meaning that requests merely...

Traverse Hierarchy with SQL++ User-defined functions (UDFs)

Traverse Hierarchy with SQL++ User-defined functions (UDFs)

User-defined functions (UDFs) are a feature that exist in most RDBMS. Whether it is Oracle PL/SQL (Procedural Language for SQL), SQL Server T-SQL (Transact-SQL), PL/pgSQL (Procedural Language/PostgreSQL), or other variants, all these languages have the general characteristics of providing a...

May 26, 2022
Creating Python and JavaScript User Defined Functions For Geospatial Queries

Creating Python and JavaScript User Defined Functions For Geospatial Queries

SQL++ (or Couchbase N1QL) queries can access data stored in your Couchbase cluster in a variety of ways. There are situations where having the business logic as part of your data queries can also be beneficial. SQL++ supports this with...

April 20, 2022
JavaScript evolution for Couchbase: Connect 2021 sessions

JavaScript evolution for Couchbase: Connect 2021 sessions

Support for JavaScript remains a priority for us at Couchbase–and during the Couchbase ConnectONLINE 2021 event last year, where we discussed how we evolved our support for JavaScript over the past year. This blog post will summarize the JavaScript-related takeaways...

January 4, 2022
Introducing Ottoman v2.0: An ODM for Node.js & Couchbase

Introducing Ottoman v2.0: An ODM for Node.js & Couchbase

On behalf of the Couchbase team, I’m absolutely thrilled to announce the General Availability of Ottoman 2.0. Ottoman is an Object Document Mapper (ODM) library for Couchbase and Node.js that maps JSON documents stored in Couchbase to native JavaScript objects....

September 30, 2021
How to Add Full-Text Search Functionality to Your JavaScript App

How to Add Full-Text Search Functionality to Your JavaScript App

It’s unavoidable: If you’re working with a document database, you’re eventually going to need to search for (and through) your JSON documents. In this tutorial, you’ll add the full-text search capabilities of Couchbase to the basic REST API built with...

September 20, 2021
How to Query JSON Data Using N1QL for Node.js and Couchbase

How to Query JSON Data Using N1QL for Node.js and Couchbase

Today’s the day your Node.js app learns “go fetch.” By following this basic tutorial, you’ll learn how to build a REST API for your Node.js app that sends N1QL / SQL queries to retrieve data from Couchbase. This post continues...

September 15, 2021
Build a REST-Based Application with Node.js, Express and Couchbase

Build a REST-Based Application with Node.js, Express and Couchbase

If you’re new to Node.js, Couchbase or both, you’re about to level up your skills. Today I’ll show you how to build a minimal REST-based application for retrieving documents from Couchbase using Node.js and Express. This post continues my introductory...

September 6, 2021
How to Create Async Get/Upsert Calls with Node.js and Couchbase

How to Create Async Get/Upsert Calls with Node.js and Couchbase

If you’re a JavaScript dev who’s transitioning to use Node.js, you’ll want to take advantage of async functions. That’s because asynchronous API calls don’t block your code and return promises. In this post, I’ll show you how to create async...

August 30, 2021
A Better Development Experience with Ottoman JS [Video]

A Better Development Experience with Ottoman JS [Video]

If you’re a JavaScript developer, I hope you know about the JavaScript & Friends conference. The JS & Friends conference is a diverse group of around 200 JavaScript developers and friends who get together to learn new skills and concepts...

August 27, 2021