{"id":2129,"date":"2022-03-14T10:23:48","date_gmt":"2022-03-14T17:23:48","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/reuse-sql-queries-between-server-mobile-app-databases\/"},"modified":"2022-03-14T10:23:48","modified_gmt":"2022-03-14T17:23:48","slug":"reuse-sql-queries-between-server-mobile-app-databases","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/pt\/reuse-sql-queries-between-server-mobile-app-databases\/","title":{"rendered":"Reuse SQL Queries between Server &#038; Mobile App Databases"},"content":{"rendered":"\n<p><span>As we all know, code is expensive to maintain\u2014the more complex the code, the higher the cost of maintaining it. Therefore, since the beginning of time, software developers have worked very hard to achieve the goal of <\/span><b>code reusability<\/b><span>.<\/span><\/p>\n\n\n\n<p><span>Couchbase Mobile 3.0 introduced support for SQL++ queries. As a developer, the first thought that came to mind was sharing queries used in projects targeting both Couchbase Server and Couchbase Mobile applications.\u00a0<\/span><\/p>\n\n\n\n<p><span>Is this a good idea? Let\u2019s explore that question using sample data and a proof-of-concept mobile application.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span>Sample data<\/span><\/h4>\n\n\n\n<p><span>All the code in this article is available on <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\"><span>GitHub<\/span><\/a><span>. See the <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\/blob\/main\/README.md\"><i><span>README<\/span><\/i><\/a> <span>for information on how to get the projects set up on your computer.<\/span><\/p>\n\n\n\n<p><span>The sample data comes from the <\/span><a href=\"https:\/\/www.openstreetmap.org\/#map=5\/38.007\/-95.844\"><span>OpenStreetMap<\/span><\/a><span> project and is licensed under the <\/span><a href=\"https:\/\/wiki.osmfoundation.org\/wiki\/Terms_of_Use\"><span>Open Data Commons Open Database License (ODbL)<\/span><\/a><span> by the OpenStreetMap Foundation.<\/span><\/p>\n\n\n\n<p><span>The data set contains all the shops that sell ice cream in the United States. An example JSON document is listed below:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\r\n &quot;type&quot;: &quot;Feature&quot;,\r\n &quot;id&quot;: &quot;node\/472242349&quot;,\r\n &quot;properties&quot;: {\r\n &quot;addrCity&quot;: &quot;Austin&quot;,\r\n &quot;addrHousenumber&quot;: &quot;4477&quot;,\r\n &quot;addrPostcode&quot;: &quot;78745&quot;,\r\n &quot;addrState&quot;: &quot;TX&quot;,\r\n &quot;addrStreet&quot;: &quot;South Lamar Boulevard&quot;,\r\n &quot;addrUnit&quot;: &quot;#790&quot;,\r\n &quot;amenity&quot;: &quot;ice_cream&quot;,\r\n &quot;cuisine&quot;: &quot;ice_cream&quot;,\r\n &quot;name&quot;: &quot;Amy&#039;s Ice Creams&quot;,\r\n &quot;phone&quot;: &quot;+1-512-891-0573&quot;,\r\n &quot;id&quot;: &quot;node\/472242349&quot;\r\n},\r\n  &quot;geometry&quot;: {\r\n   &quot;type&quot;: &quot;Point&quot;,\r\n   &quot;coordinates&quot;: [\r\n    -97.7998856,\r\n    30.230688\r\n  ]\r\n }\r\n}<\/code><\/pre>\n\n\n\n<p><span>As you can see, this is a versatile dataset for testing because it has properties embedded into the documents.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span>Sample mobile application<\/span><\/h4>\n\n\n\n<p><span>The <a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\">sample mobile application<\/a> was written in <\/span><a href=\"https:\/\/developer.apple.com\/documentation\/swiftui\/\"><span>SwiftUI<\/span><\/a><span> with <\/span><a href=\"https:\/\/developer.apple.com\/documentation\/combine\"><span>Combine<\/span><\/a><span> and is an iOS\/macOS application that displays all the various shops that sell ice cream in the United States. The application includes a <\/span><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/prebuilt-database.html\"><span>pre-built database<\/span><\/a><span> with the same JSON documents already imported into it for convenience. This mobile application uses the latest version of the <\/span><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/quickstart.html\"><span>Couchbase Lite SDK<\/span><\/a><span>. You can open the project in XCode from the project file in the src folder to follow along.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span>A simple query comparison<\/span><\/h4>\n\n\n\n<p><span>To start our testing, we can write a simple query, for Couchbase Server, to show all the ice cream shop addresses and order them by the shop name:<\/span><\/p>\n\n\n<p>[crayon decode-attributes=&#8221;false&#8221; lang=&#8221;default&#8221; decode=&#8221;true&#8221;]SELECT id, properties.addrCity, properties.addrHousenumber, properties.addrPostcode,<br \/>\nproperties.addrStreet, properties.addrState, properties.name<br \/>\nFROM icecream<br \/>\nWHERE properties.addrCity &lt;&gt; &#8220;&#8221;<br \/>\nAND type = &#8220;Feature&#8221;<br \/>\nORDER BY properties.name[\/crayon]<\/p>\n\n\n\n<p><span>This query has a filter that only returns documents where the property&#8217;s object <\/span><i><span>addrCity <\/span><\/i><span>field has a value and where the document <\/span><i><span>type<\/span><\/i><span> is equal to <\/span><i><span>Feature<\/span><\/i><span>. If you wonder why we have the <\/span><i><span>addrCity<\/span><\/i><span> filter, it\u2019s because of dirty data or documents without names or missing information in this dataset. Using a <\/span><i><span>type<\/span><\/i><span> attribute is common in mobile applications to filter out different types of documents.<\/span><\/p>\n\n\n\n<p><span>We can use the <\/span><b>Query Editor<\/b><span> from the Couchbase Server<\/span> <a href=\"https:\/\/docs.couchbase.com\/server\/current\/manage\/manage-ui\/manage-ui.html\"><b>Web Console<\/b><\/a><span> to run this query. When I ran this on my personal Macbook Pro M1 Max, the result came back in 38.4ms. This query uses the <\/span><i><span>adv_properties_addrCity_type<\/span><\/i><span> index, which you can see by clicking the <\/span><b>Index Advisor<\/b><span> button.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span>Porting the query to Couchbase Lite<\/span><\/h4>\n\n\n\n<p><span>Now let\u2019s look at this same query running on our mobile app. To view the mobile app, you can use XCode to open up the <\/span><i><span>IceCreamLocator.xcodeproj<\/span><\/i><span> file located in the <\/span><i><span>src <\/span><\/i><span>folder. Once opened in Xcode, find the <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\/blob\/main\/src\/Shared\/Data\/IceCreamLocationRepository.swift#L32\"><i><span>IceCreamLocationRepository<\/span><\/i><\/a><span> swift file in the <\/span><i><span>SharedData<\/span><\/i><span> folder.\u00a0<\/span><\/p>\n\n\n\n<p><span>The <\/span><i><span>init <\/span><\/i><span>function turns on verbose logging for the database to inspect the query information. Using verbose logging, you can review what\u2019s going on within Couchbase Lite, including query performance.<\/span><\/p>\n\n\n\n<p><span>Let\u2019s review the simple query from Couchbase Server and see how it works in Swift with the new SQL++ Query API. The function for the simple query is named <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\/blob\/main\/src\/Shared\/Data\/IceCreamLocationRepository.swift#L101\"><i><span>getListByTypeCityOrderName<\/span><\/i><\/a><span>, and the code is displayed below:<\/span><\/p>\n\n\n<p>[crayon decode-attributes=&#8221;false&#8221; lang=&#8221;default&#8221; decode=&#8221;true&#8221;]  func getListByTypeCityOrderName() -&gt; Void {<br \/>\n      do {<br \/>\n        if let query = try _db?.createQuery(&#8220;SELECT id,<br \/>\nproperties.addrCity, properties.addrHousenumber, properties.addrPostcode, properties.addrStreet,<br \/>\nproperties.addrState, properties.name FROM _ WHERE properties.addrCity &lt;&gt; &#8220;&#8221; AND<br \/>\ntype = &#8220;Feature&#8221; ORDER BY properties.name&#8221;) {<br \/>\n            var results: [IceCreamLocation] = []<br \/>\n            let explain = try query.explain()<br \/>\n            print (&#8220;**EXPLAIN** (explain)&#8221;)<br \/>\n            for result in try query.execute() {<br \/>\n                if let data = result.toJSON().data(using: .utf8){<br \/>\n                   let location = try<br \/>\nJSONDecoder().decode(IceCreamLocation.self, from: data)<br \/>\n                   results.append(location)<br \/>\n             }<br \/>\n           }<br \/>\n           self.iceCreamLocationList.send(results)<br \/>\n           self.iceCreamLocationList.send(completion: .finished)<br \/>\n         }<br \/>\n     } catch {<br \/>\n         print(&#8220;**Error**: (error)&#8221;)<br \/>\n         self.iceCreamLocationList.send(completion: .failure(DbError.unknown))<br \/>\n     }<br \/>\n}[\/crayon]<\/p>\n\n\n\n<p><span>There are a few ways to make an SQL++ query in Swift. In this example, we use the database <\/span><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/query-n1ql-mobile.html\"><i><span>createQuery<\/span><\/i><\/a> <span>function to create the query. In Couchbase Lite, I\u2019m using the underscore character (_) as the database name before the <\/span><i><span>FROM <\/span><\/i><span>statement. Changing the database name is one of the expected changes to reuse SQL++ statements. Also, to escape the quotation marks in the <\/span><i><span>WHERE <\/span><\/i><span>clause, I had to add the Swift string escape character (<\/span><i><span><\/span><\/i><span>) before each quotation mark.\u00a0<\/span><\/p>\n\n\n\n<p><span>To test this query while running, you can open the <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\/blob\/main\/src\/Shared\/ViewModels\/IceCreamListViewModel.swift#L24\"><i><span>IceCreamListViewModel<\/span><\/i><\/a> <span>file found in the <\/span><i><span>ViewModels <\/span><\/i><span>folder. Locate the <\/span><i><span>init <\/span><\/i><span>function and uncomment out the first example line located at the bottom of the function that calls the <\/span><i><span>getListByTypeCityOrderName<\/span><\/i><span> function from the <\/span><i><span>_repository <\/span><\/i><span>variable:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \/\/first example\r\n_repository.getListByTypeCityOrderName()<\/code><\/pre>\n\n\n\n<p><span>Now you can use Xcode to run the application on an iOS Simulator or a macOS app. Next, open the <\/span><b>Debug Console <\/b><span>in Xcode by clicking the <\/span><b>Show Debugging <\/b><span>icon in the lower right corner of the Xcode editor, as highlighted below.<\/span><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12888\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/properties.png\" alt=\"\" width=\"858\" height=\"396\"><\/p>\n\n\n\n<p><span>Verbose logging will display a massive amount of logging information. To help find the correct information in the logs, use the filter box below the console. For example, enter the text \u201c<\/span><i><span>Query Info<\/span><\/i><span>\u201d and then hit the enter key on your keyboard to see information about the query. The debug console will filter the data that Couchbase Lite returns.<\/span><\/p>\n\n\n\n<p><span>Inspecting the logs will show you the <\/span><i><span>Query Info<\/span><\/i><span> log entry and the number of documents found by the query, how many bytes and how long the query took. Remember, the numbers you are looking at are from a simulator, not an actual device. For performance tuning of mobile apps, you should use tools from Apple with a real device.<\/span><\/p>\n\n\n\n<p><span>The speed at which this query ran is impressive. Even more impressive, there haven\u2019t been any indexes created yet, so this query runs without an index and does a table scan which means it has to look through the database at each document to see if it matches the requirements of the query. Couchbase Lite doesn\u2019t require indexes and will do table scans if needed, whereas Couchbase Server does require indexes because table scans can kill the performance of the entire cluster.\u00a0<\/span><\/p>\n\n\n\n<p><span>In several cases adding indexes can significantly improve the performance of your queries, so let\u2019s stop running the application and add the proper index and recheck performance.<\/span><\/p>\n\n\n\n<p><span>Open the <\/span><i><span>IceCreamLocationRepository<\/span><\/i><span> and locate the <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\/blob\/main\/src\/Shared\/Data\/IceCreamLocationRepository.swift#L84\"><i><span>createIceCreamIndexes<\/span><\/i><\/a> <span>function. Uncomment the first block of code for creating the first query index:<\/span><\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]   let simpleIndex = ValueIndexConfiguration([&#8220;properties.name&#8221;, &#8220;properties.addrCity&#8221;, &#8220;type&#8221;])<br \/>\n   try _db?.createIndex(simpleIndex, name: &#8220;idx_location_type_city_name&#8221;)[\/crayon]<\/p>\n\n\n\n<p><span>How do we test to see if the query used the index we created? In the <\/span><i><span>getListByTypeCityOrderName<\/span><\/i><span> function, you will see two lines that prints results from the explain function to the console:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>let explain = try query.explain()\r\nprint (&quot;**EXPLAIN** (explain)&quot;)<\/code><\/pre>\n\n\n\n<p><span>The query <\/span><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/troubleshooting-queries.html#using\"><span>explain<\/span><\/a><span> function will run the equivalent of the SQLite <\/span><i><span>EXPLAIN QUERY PLAN<\/span><\/i><span> command and store the results in a string you send to the console using the print function. You can filter for <\/span><i><span>SCAN TABLE <\/span><\/i><span>in your debug console to find the results. When reviewing the results, make sure you remove your previous filter from the console window. Now rerun the application and look through the logs to check the performance change.<\/span><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12889\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/scantable.png\" alt=\"\" width=\"854\" height=\"485\"><\/p>\n\n\n\n<p><span>You should see the <\/span><i><span>USING INDEX <\/span><\/i><span>with the created index name, which tells you that the query uses the proper index. Note that while indexes can help queries, they can also slow down insert and updates to documents. You can find more information about indexing in the Couchbase Lite <\/span><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/indexing.html\"><span>documentation<\/span><\/a><span>.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span>Another query comparison<\/span><\/h4>\n\n\n\n<p><span>In our second comparison, we filter out results only to show ice cream shops in the State of Georgia, ordered by City and State:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT id, properties.addrCity, properties.addHousenumber, properties.addrPostcode, \r\nproperties.addrStreet, properties.addrState, properties.name \r\nFROM icecream \r\nWHERE\r\nproperties.addrCity IS NOT NULL \r\nAND properties.addrState = &#039;GA&#039;\r\nAND type = &quot;Feature&quot; \r\nORDER BY properties.name<\/code><\/pre>\n\n\n\n<p><span>This query returns 15 documents and uses a different query since we use the <\/span><i><span>properties.addrState <\/span><\/i><span>and <\/span><i><span>properties.addrCity<\/span><\/i><span> attributes in our <\/span><i><span>WHERE <\/span><\/i><span>clause.\u00a0<\/span><\/p>\n\n\n\n<p><span>Note that we switched out the way we check the <\/span><i><span>properties.addrCity<\/span><\/i><span> attribute and use the <\/span><i><span>IS NOT NULL<\/span><\/i><span> statement now. This shows the flexibility of the SQL++ language and how developers can use different syntax to produce the same results.<\/span><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12890\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/selectID.png\" alt=\"\" width=\"1600\" height=\"699\"><\/p>\n\n\n\n<p><span>Now, let\u2019s go back to our mobile app to look at any differences. The function for our second query is named <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\/blob\/main\/src\/Shared\/Data\/IceCreamLocationRepository.swift#L122\"><i><span>getListByStateGeorgia<\/span><\/i><\/a><span>, and the code is displayed below:<\/span><\/p>\n\n\n<p>[crayon decode-attributes=&#8221;false&#8221; lang=&#8221;default&#8221; decode=&#8221;true&#8221;]    func getListByStateGeorgia() -&gt; Void {<br \/>\n        do {<br \/>\n           if let query = try _db?.createQuery(&#8220;SELECT id, properties.addrCity,<br \/>\nproperties.addrHousenumber, properties.addrPostcode, properties.addrStreet,<br \/>\nproperties.addrState, properties.name FROM _ WHERE properties.addrCity NOT NULL AND<br \/>\nproperties.addrState = &#8220;GA&#8221; AND type=&#8221;Feature&#8221; ORDER BY properties.name&#8221;) {<br \/>\n               var results: [IceCreamLocation] = []<br \/>\n               let explain = try query.explain()<br \/>\n               print (&#8220;**EXPLAIN** (explain)&#8221;)<br \/>\n               for result in try query.execute() {<br \/>\n                   if let data = result.toJSON().data(using: .utf8){<br \/>\n                      let location = try<br \/>\nJSONDecoder().decode(IceCreamLocation.self, from: data)<br \/>\n                      results.append(location)<br \/>\n                 }<br \/>\n              }<br \/>\n              self.iceCreamLocationList.send(results)<br \/>\n              self.iceCreamLocationList.send(completion: .finished)<br \/>\n          }<br \/>\n        } catch {<br \/>\n            print(&#8220;**Error**: (error)&#8221;)<br \/>\n            self.iceCreamLocationList.send(completion: .failure(DbError.unknown))<br \/>\n     }<br \/>\n   }[\/crayon]<\/p>\n\n\n\n<p><span>To test this new query, you can open the <\/span><i><span>IceCreamListViewModel<\/span><\/i><span>. Locate the <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\/blob\/main\/src\/Shared\/ViewModels\/IceCreamListViewModel.swift#L21\"><i><span>init<\/span><\/i><\/a> <span>function and comment out the first example line located at the bottom of the function that calls the <\/span><i><span>getListByTypeCityOrderName <\/span><\/i><span>function from the <\/span><i><span>_repository<\/span><\/i><span> variable and uncomment out the line that calls our new function:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/first example\r\n\/\/_repository.getListByTypeCityOrderName()\r\n\r\n\/\/second example\r\n_repository.getListByStateGeorgia()<\/code><\/pre>\n\n\n\n<p><span>You can debug the app using Xcode and check the debug area. It shows the same 15 documents that were returned by the query ran on Couchbase Server, but we are back to doing a table scan which isn\u2019t the behavior we want\u2014we changed the query, but we didn\u2019t create any new indexes yet.<\/span><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12891\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/scantableusetemp.png\" alt=\"\" width=\"856\" height=\"420\"><\/p>\n\n\n\n<p><span>To fix this, we can go back to the <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\/blob\/main\/src\/Shared\/Data\/IceCreamLocationRepository.swift\"><i><span>IceCreamLocationRepository<\/span><\/i><\/a> <span>and locate the <\/span><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\/blob\/main\/src\/Shared\/Data\/IceCreamLocationRepository.swift#L86\"><i><span>createIceCreamIndexes<\/span><\/i><\/a> <span>function. Uncomment the second block of code for creating the second query index:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        let secondIndex = \r\nValueIndexConfiguration([&quot;properties.name&quot;,&quot;properties.addrCity&quot;, &quot;type&quot;, &quot;properties.addrState&quot;])\r\n        try _db?.createIndex(secondIndex, name: &quot;idx_location_type_city_state_name&quot;)<\/code><\/pre>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12892\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/scantablelocationtype.png\" alt=\"\" width=\"860\" height=\"426\"><\/p>\n\n\n\n<p><span>We found that we could reuse the code in these two more simple queries, but we had to add the indexes to avoid table scans.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span>Catches with reusing queries<\/span><\/h4>\n\n\n\n<p><span>Couchbase Server and Couchbase Mobile don\u2019t use the same storage or query engine. Therefore, you might run into Couchbase Server queries that need slight modifications to be optimized for Couchbase Mobile.<\/span><\/p>\n\n\n\n<p><span>For more information on Couchbase Server, check out the documentation on the <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/cost-based-optimizer.html\"><span>Cost-Based Optimizer<\/span><\/a><span> that the query engine uses. The Couchbase Developer portal also has a good article on improving <\/span><a href=\"https:\/\/developer.couchbase.com\/tutorial-tuning-tips-and-advice\"><span>query performance<\/span><\/a><span> on Couchbase Server that can explain why some queries are written in a specific way.\u00a0<\/span><\/p>\n\n\n\n<p><span>I recommend reading the Couchbase Mobile documentation on troubleshooting <\/span><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/troubleshooting-queries.html\"><span>queries<\/span><\/a><span> as it has helped me write optimized queries and further explains the SQLite query plan output.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span>Summary<\/span><\/h4>\n\n\n\n<p><span>As shown in our code examples with the Couchbase Mobile 3.0 release, it is possible to reuse SQL++ code between Server and Mobile. However, you may need to modify queries and indexes for optimal performance. Given this, I highly recommend reading through the excellent documentation on <\/span><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/query-n1ql-mobile-server-diffs.html\"><span>SQL++ for Mobile &#8211; Differences from SQL++ for Server<\/span><\/a><span> and <\/span><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/query-n1ql-mobile.html\"><span>SQL++ Query Strings<\/span><\/a><span>. It has valuable information on changes you might need to make to your queries to use them in your mobile applications.<\/span><\/p>\n\n\n\n<p><span>Here are some of the primary resources referenced throughout the post:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/biozal\/cblite-swiftui-icecream-locations\"><span>Code samples from GitHub<\/span><\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.openstreetmap.org\/#map=5\/38.007\/-95.844\"><span>OpenStreetMap project<\/span><\/a><\/li>\n\n\n<li><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/prebuilt-database.html\"><span>Couchbase Mobile &#8211; Prebuilt database docs<\/span><\/a><\/li>\n\n\n<li><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/quickstart.html\"><span>Couchbase Lite on Swift &#8211; Quickstart docs<\/span><\/a><span>\u00a0<\/span><\/li>\n\n\n<li><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/indexing.html\"><span>Couchbase Lite &#8211; Indexing docs<\/span><\/a><\/li>\n\n\n<li><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/cost-based-optimizer.html\"><span>Couchbase Server &#8211; Cost-based Optimizer docs<\/span><\/a><\/li>\n\n\n<li><a href=\"https:\/\/developer.couchbase.com\/tutorial-tuning-tips-and-advice\"><span>Couchbase Server &#8211; Tuning Tips and Advice<\/span><\/a><\/li>\n\n\n<li><a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/swift\/troubleshooting-queries.html\"><span>Couchbase Mobile &#8211; Troubleshooting Queries<\/span><\/a><\/li>\n\n<\/ul>\n\n\n\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we all know, code is expensive to maintain\u2014the more complex the code, the higher the cost of maintaining it. Therefore, since the beginning of time, software developers have worked very hard to achieve the goal of code reusability. Couchbase Mobile 3.0 introduced support for SQL++ queries. As a developer, the first thought that came [&hellip;]<\/p>\n","protected":false},"author":77540,"featured_media":2126,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[127,9,54,18],"tags":[535],"ppma_author":[536],"class_list":["post-2129","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-design","category-couchbase-mobile","category-couchbase-server","category-n1ql-query","tag-mobile-3-0"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Reuse SQL Queries between Server &amp; Mobile App Databases - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Couchbase Mobile 3.0 introduced support for SQL++ queries, learn how to reuse SQL queries between Server and Mobile App Databases.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/pt\/reuse-sql-queries-between-server-mobile-app-databases\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reuse SQL Queries between Server &amp; Mobile App Databases\" \/>\n<meta property=\"og:description\" content=\"Couchbase Mobile 3.0 introduced support for SQL++ queries, learn how to reuse SQL queries between Server and Mobile App Databases.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/pt\/reuse-sql-queries-between-server-mobile-app-databases\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-14T17:23:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/shutterstock_1013448550-scaled-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Aaron LaBeau - Principal Software Engineer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@biozal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aaron LaBeau - Principal Software Engineer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/\"},\"author\":{\"name\":\"Aaron LaBeau - Principal Software Engineer\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a68fa58a5fc5d8bf29577e7dc003a54\"},\"headline\":\"Reuse SQL Queries between Server &#038; Mobile App Databases\",\"datePublished\":\"2022-03-14T17:23:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/\"},\"wordCount\":1906,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/shutterstock_1013448550-scaled-1.jpg\",\"keywords\":[\"mobile 3.0\"],\"articleSection\":[\"Application Design\",\"Couchbase Mobile\",\"Couchbase Server\",\"SQL++ \\\/ N1QL Query\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/\",\"name\":\"Reuse SQL Queries between Server & Mobile App Databases - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/shutterstock_1013448550-scaled-1.jpg\",\"datePublished\":\"2022-03-14T17:23:48+00:00\",\"description\":\"Couchbase Mobile 3.0 introduced support for SQL++ queries, learn how to reuse SQL queries between Server and Mobile App Databases.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/shutterstock_1013448550-scaled-1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/shutterstock_1013448550-scaled-1.jpg\",\"width\":2560,\"height\":1440},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ko\\\/reuse-sql-queries-between-server-mobile-app-databases\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reuse SQL Queries between Server &#038; Mobile App Databases\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a68fa58a5fc5d8bf29577e7dc003a54\",\"name\":\"Aaron LaBeau - Principal Software Engineer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2c9b8996f5ac6e2998b835ee812afcbc3f2097a0ed86f6e66bf520fac8196733?s=96&d=mm&r=gac67534e9e107abff83fe301785dd490\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2c9b8996f5ac6e2998b835ee812afcbc3f2097a0ed86f6e66bf520fac8196733?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2c9b8996f5ac6e2998b835ee812afcbc3f2097a0ed86f6e66bf520fac8196733?s=96&d=mm&r=g\",\"caption\":\"Aaron LaBeau - Principal Software Engineer\"},\"description\":\"Aaron LaBeau is a Principal Software Engineer on the Developer Experience and Ecosystem team. He has over 29 years with substantial development experience in Objective-C, Swift, Kotlin, Java, C#, Javascript, and Typescript. You can find his GitHub profile at https:\\\/\\\/www.github.com\\\/biozal\\\/.\",\"sameAs\":[\"https:\\\/\\\/www.couchbase.com\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/aaron-labeau-b444747\\\/\",\"https:\\\/\\\/x.com\\\/biozal\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCXgF-JqwBRGSawXajr6plGg\"],\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/pt\\\/author\\\/biozal\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Reuse SQL Queries between Server & Mobile App Databases - The Couchbase Blog","description":"Couchbase Mobile 3.0 introduced support for SQL++ queries, learn how to reuse SQL queries between Server and Mobile App Databases.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/pt\/reuse-sql-queries-between-server-mobile-app-databases\/","og_locale":"pt_BR","og_type":"article","og_title":"Reuse SQL Queries between Server & Mobile App Databases","og_description":"Couchbase Mobile 3.0 introduced support for SQL++ queries, learn how to reuse SQL queries between Server and Mobile App Databases.","og_url":"https:\/\/www.couchbase.com\/blog\/pt\/reuse-sql-queries-between-server-mobile-app-databases\/","og_site_name":"The Couchbase Blog","article_published_time":"2022-03-14T17:23:48+00:00","og_image":[{"width":2560,"height":1440,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/shutterstock_1013448550-scaled-1.jpg","type":"image\/jpeg"}],"author":"Aaron LaBeau - Principal Software Engineer","twitter_card":"summary_large_image","twitter_creator":"@biozal","twitter_misc":{"Written by":"Aaron LaBeau - Principal Software Engineer","Est. reading time":"10 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/"},"author":{"name":"Aaron LaBeau - Principal Software Engineer","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/8a68fa58a5fc5d8bf29577e7dc003a54"},"headline":"Reuse SQL Queries between Server &#038; Mobile App Databases","datePublished":"2022-03-14T17:23:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/"},"wordCount":1906,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/shutterstock_1013448550-scaled-1.jpg","keywords":["mobile 3.0"],"articleSection":["Application Design","Couchbase Mobile","Couchbase Server","SQL++ \/ N1QL Query"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/","url":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/","name":"Reuse SQL Queries between Server & Mobile App Databases - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/shutterstock_1013448550-scaled-1.jpg","datePublished":"2022-03-14T17:23:48+00:00","description":"Couchbase Mobile 3.0 introduced support for SQL++ queries, learn how to reuse SQL queries between Server and Mobile App Databases.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/shutterstock_1013448550-scaled-1.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/shutterstock_1013448550-scaled-1.jpg","width":2560,"height":1440},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/ko\/reuse-sql-queries-between-server-mobile-app-databases\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Reuse SQL Queries between Server &#038; Mobile App Databases"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/8a68fa58a5fc5d8bf29577e7dc003a54","name":"Aaron LaBeau - Principal Software Engineer","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/2c9b8996f5ac6e2998b835ee812afcbc3f2097a0ed86f6e66bf520fac8196733?s=96&d=mm&r=gac67534e9e107abff83fe301785dd490","url":"https:\/\/secure.gravatar.com\/avatar\/2c9b8996f5ac6e2998b835ee812afcbc3f2097a0ed86f6e66bf520fac8196733?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2c9b8996f5ac6e2998b835ee812afcbc3f2097a0ed86f6e66bf520fac8196733?s=96&d=mm&r=g","caption":"Aaron LaBeau - Principal Software Engineer"},"description":"Aaron LaBeau is a Principal Software Engineer on the Developer Experience and Ecosystem team. He has over 29 years with substantial development experience in Objective-C, Swift, Kotlin, Java, C#, Javascript, and Typescript. You can find his GitHub profile at https:\/\/www.github.com\/biozal\/.","sameAs":["https:\/\/www.couchbase.com","https:\/\/www.linkedin.com\/in\/aaron-labeau-b444747\/","https:\/\/x.com\/biozal","https:\/\/www.youtube.com\/channel\/UCXgF-JqwBRGSawXajr6plGg"],"url":"https:\/\/www.couchbase.com\/blog\/pt\/author\/biozal\/"}]}},"acf":[],"authors":[{"term_id":536,"user_id":77540,"is_guest":0,"slug":"biozal","display_name":"Aaron LaBeau - Principal Software Engineer","avatar_url":{"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/aaron-couchbase-3.jpg","url2x":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/aaron-couchbase-3.jpg"},"0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/2129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/users\/77540"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/comments?post=2129"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/2129\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media\/2126"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media?parent=2129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/categories?post=2129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/tags?post=2129"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/ppma_author?post=2129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}