Skip to content

Commit cd4cf80

Browse files
committed
Update Patterns SQL Interface - JSON Input.md
1 parent cf42aba commit cd4cf80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Patterns SQL Interface - JSON Input.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The JSON is a popular and robust format for passing structured information in te
1010

1111
JSON encoding of the passed data has several benefits. It permits having a fixed SQL script accepting an array of arbitrary length as a query parameter. Also, it establishes a relatively simple, robust, and well-defined SQL interface based on a broadly supported format. Finally, because each query parameter may cost an additional API call, this approach may also improve the overall performance of the database call. An important consideration to bear in mind related to the JSON containers is the potential side effects of data conversion between numeric and textual formats.
1212

13-
Consider a table *fs_objects(bin_id, prefix, name)* containing a list of file system objects, uniquely identified by their absolute paths (*prefix* || *path_sep* || *name*) and a unique *bin_id*. Suppose an application needs to pass a set of new objects for insertion into this table. Such a set is a 1D vector of arbitrary size, which may contain:
13+
Consider a table *fs_objects(bin_id, prefix, name)* containing a list of file system objects, uniquely identified by their absolute paths *concat*(*prefix*, *path_sep*, *name*) and a unique *bin_id*. Suppose an application needs to pass a set of new objects for insertion into this table. Such a set is a 1D vector of arbitrary size, which may contain:
1414

1515
1. **a scalar value for a single column** (e.g., absolute path).
1616
2. **a pair of scalar values for two columns** (e.g., id and absolute path)

0 commit comments

Comments
 (0)