Tag: UDF

Recursive Query Processing in SQL++ (N1QL)

Recursive Query Processing in SQL++ (N1QL)

It is extremely likely that you have come across issues with hierarchical lookups or graph traversal in your application as a developer who handles real-world use cases. And, for obvious reasons, you prefer solving them at the database layer and...

Madhuram Gupta June 23, 2023
From N1QL to JavaScript and Back – Part 7: Hierarchical JavaScript Storage

From N1QL to JavaScript and Back – Part 7: Hierarchical JavaScript Storage

In previous blogs, we covered executing N1QL (SQL++) from JavaScript functions, processing documents through iterators, manipulating data, handling errors, prepared statements and other advanced topics. The final topic to cover is a newly added feature to 7.1 that enables JavaScript library storage options....

Madhuram Gupta November 3, 2022
From N1QL to JavaScript and Back – Part 6: Advanced Topics

From N1QL to JavaScript and Back – Part 6: Advanced Topics

In previous blogs, we covered executing N1QL (SQL++) from JavaScript functions, processing documents through iterators, manipulating data, handling errors, and using prepared statements. We have a few more advanced topics to cover before we move onto manipulating JavaScript libraries, such as calling other...

Madhuram Gupta October 4, 2022
From N1QL to JavaScript and Back – Part 5: Prepared statements

From N1QL to JavaScript and Back – Part 5: Prepared statements

In previous blogs, we covered executing N1QL (SQL++) from JavaScript functions, processing documents through iterators, manipulating data. and handling errors. We now move to executing dynamic statements. Prepared statements JavaScript functions can prepare and execute prepared statements, much like any request...

Madhuram Gupta September 21, 2022
From N1QL to JavaScript and back – Part 4: Error Handling

From N1QL to JavaScript and back – Part 4: Error Handling

In previous blogs, we have covered executing N1QL from JavaScript functions, processing documents through iterators, and manipulating data. We now move onto handling errors from N1QL statements. Error handling When an error of any nature is encountered, the jsevaluator by...

Madhuram Gupta August 25, 2022
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...

Madhuram Gupta August 4, 2022
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...

Madhuram Gupta July 26, 2022
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...

Madhuram Gupta July 13, 2022
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...

Madhuram Gupta May 26, 2022
What’s New In Couchbase Server 7.1

What’s New In Couchbase Server 7.1

Can a Database Fight Inflation? Introducing Couchbase Server 7.1 This year, I’ve asked myself, how can a database help fight inflation? The answer is to make efficiency improvements in the database that outpace inflation. For as long as I’ve worked...

Madhuram Gupta May 10, 2022
Creating Python and JavaScript User Defined Functions For Geospatial Queries

Creating Python and JavaScript User Defined Functions For Geospatial Queries

SQL++ 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 User Defined Functions...

Madhuram Gupta April 20, 2022
Your Guide to User-Defined Functions in Couchbase Analytics

Your Guide to User-Defined Functions in Couchbase Analytics

User-defined functions put you in the driver’s seat when it comes to querying and analyzing your data. In the Couchbase ecosystem, user-defined functions (UDFs) are reusable and parameterizable SQL++ queries that enable you to modularize queries and increase code reuse...

Madhuram Gupta August 26, 2021