Database abstraction

Db abstraction release notes 3rd March 2015 – v2.2

Here are the Database abstraction with google apps script release notes for March 2015. Modules in scope and dependencies can be found on github. March 3rd 2015 – v2.2 This is a medium sized update, mainly concerned with […]

Database abstraction

January 2015

Here are the release notes for January 2015. Modules in scope and dependencies can be found on GitHub January 5th 2015 This is a large update with every single library updated. The main changes are […]

Database abstraction

All about locking

The LockService is sometimes misunderstood. It says this in the documentation: Does the lock apply to code fragments or the entire library ? I’ve noticed some discussions on Stackoverflow and elsewhere that the lock applies to a […]

No Picture
Database abstraction

DataStore quotas

Some information on quotas when using the DataStore back end in Database abstraction with google apps scriptThe library reference is  Mj61W-201_t_zC9fJg1IzYiz3TLx7pV4j   Dashboard If you are using the free tier for DataStore, you’ll run out of quota […]

Database abstraction

Creating a driver

It may be that I haven’t yet written a driver for a back end you want to use. I’m encouraging others to write a back end and submit it for others to use. It’s not […]

No Picture
Database abstraction

RipDB – scriptDB emulator

As you all know, scriptDB, the handy little nosql database associated with each script, was deprecated some time ago. Most people will have already moved to an alternative. Some have moved to my database abstraction solution, which provides […]

Database abstraction

Release notes

The release notes for any modules connected with DbAbstraction will be posted here. You can find all the library dependencies listed here. List of releases January 2015 March 2015

Database abstraction

Working with transactions

Most database APIs have a way of dealing with transactions – a set of operations all of which much work, and a way of rolling back if they don’tIndeed many of the back-ends implemented here […]

Database abstraction

Some test cases for various backends

Here are some test cases for database abstraction as described in Database abstraction with google apps script The library reference is Mj61W-201_t_zC9fJg1IzYiz3TLx7pV4j Once you have set up your environment you can use these test cases to […]

No Picture
Database abstraction

datastore driver code

This is the the driver for DB.DATASTORE described in Database abstraction with google apps script The library reference is  MPZF_EC6nOZFAjMRqCxEaUyz3TLx7pV4j  This is a little more complicated that the other drivers, and in fact is made up […]

Database abstraction

Relative performance

Some information on performance when using the DataStore back end in Database abstraction with google apps scriptThe library reference is  Mj61W-201_t_zC9fJg1IzYiz3TLx7pV4j   Comparing scriptDB, parse and datastore In Migrate data from scriptDb to Datastore I showed how to copy […]

No Picture
Database abstraction

Migrate data from scriptDb to Datastore

This shows how to easily copy data between back ends as described in Database abstraction with google apps scriptThe library reference is  Mj61W-201_t_zC9fJg1IzYiz3TLx7pV4j   Example If you are using Database abstraction with google apps script, changing back ends […]

No Picture
Database abstraction

Keys and data format

Many backends assign unique keys and other control information to data objects. In order to keep the results for a query compatible between backends, the driver has the responsibility to remove these. However there are […]

Database abstraction

Or operations

Typically a query by example consists of AND operations.  handler.query ({age:5, height:0.7}); Using constraints just gives us the opportunity for more complicated AND operations var c = enums.CONSTRAINTS; handler.query ( age: handler.constraints([[c.LTE,.9],[c.GTE,.5]]), age: handler.constraint([c.LT,7])); Sometimes you want […]

Database abstraction

Dealing with constraints

Each driver typically has its own way of dealing with query constraints. A example of a constraint would be f1 < 2 and f2 >= 3. Since the data handler uses a query by example syntax, it’s […]

Database abstraction

Copying data between various drivers

Here’s a test copying between various drivers and comparing the results.  var fusionKey = “1pvt-tlc5z6Lek8K7vAIpXNUsOjX3qTbIsdXx9Fo”;var sheetId =  “12pTwh5Wzg0W4ZnGBiUI3yZY8QFoNI8NNx_oCPynjGYY”;var sheetName = “play”;  function apiRoundTest() {   // get some data from a fusion table  //fusion  var fusionHandler = […]

No Picture
Database abstraction

Back end performance linearity

Some information on performance of each of the back ends in Database abstraction with google apps script The library reference is   Mj61W-201_t_zC9fJg1IzYiz3TLx7pV4j Comparing linearity In Relative performance I covered performance of scriptDB versus Parse versus DataStore.  Overall, Parse […]

Database abstraction

Comparing all back ends performance

Some information on performance of each of the back ends in Database abstraction with google apps script The library reference is  Mj61W-201_t_zC9fJg1IzYiz3TLx7pV4j   Update – I’ve added Driver MongoLab since these original tests were made. For a more […]

No Picture
Database abstraction

Datastore driver

This is the the driver for DB.DATASTORE described in Database abstraction with google apps scriptThe library reference is MPZF_EC6nOZFAjMRqCxEaUyz3TLx7pV4j This tutorial references the the cDataHandler and cEzyOauth2, both of which have been superseded by cDbAbstraction and cGoa which are easier to […]

No Picture
Database abstraction

How to write a driver

Start by copying an existing driver, closest to the underlying datastore. You can find the list of existing drivers here. The driver is called by the DataHandler and must provide a method for the main functionality it implements.  […]

No Picture
Database abstraction

Apps built with data abstraction

In Database abstraction with google apps script I introduced a library for separating data access from the database being used, using Google Apps Script as broker. The access into this was either via a library, or through DataHandler REST […]

No Picture
Database abstraction

Driver DbAbstraction

The DataHandler supports a host of backends. One of the problems with all the drivers being in that handler library is that when you create an app with say, a backend of sheets, it’s going […]

No Picture
Database abstraction

Driver Import.io

This is the the driver for DB.IMPORTIO described in Database abstraction with google apps script   The library reference is  MJWmIWvhOOsv401piLKzeNai_d-phDA33 Reference This driver came about following this post from +Martin Hawksey about import.io web scraping, and it uses his library to […]

No Picture
Database abstraction

Working with big caches

In Database caching I showed how to use a cacheHandler to speed things up and avoid using up service quotas. In some cases you may hit the maximum cache size, which is 100k. The cache handler can […]

Database abstraction

Database caching

If you are abstracting the database provider, you can move up caching to the handler level. This will mean that we can use Google CacheService to cache queries before we even worry about which flavor of database […]

No Picture
Database abstraction

VBA API using the Google Apps Script dbab library

This is the dbab JSON API for  Database abstraction with google apps script, which is Mj61W-201_t_zC9fJg1IzYiz3TLx7pV4j. In JSON API for data abstraction classes I covered how to access the JSON API for Database abstraction with google apps script. Now let’s […]

Database abstraction

JSON API for data abstraction classes

This is the dbab JSON API for  Database abstraction with google apps script, which is Mj61W-201_t_zC9fJg1IzYiz3TLx7pV4j.   One great thing about Google Apps Script is that you can expose an app as a web app, so that […]

No Picture
Database abstraction

Database access to a variety of databases from Excel

Here’s a VBA app that uses Database abstraction with google apps script via the DataHandler library. You need to download the latest version of the dbAbstraction.xlsm workbook from Downloads. Note that a Google Script Webapp is providing the gateway from your VBA […]

Database abstraction

Accessing Google Sheets directly from Excel

Here’s a VBA app that uses Database abstraction with google apps script via the DataHandler library. You need to download the latest version of the cDataSet.xlsm workbook from Downloads It’s made up of these components DataHandler REST API which uses the DataHandler and  the DriverSheet and Database […]

No Picture
Database abstraction

pollHandler app and library

Here’s an app that uses Database abstraction with google apps script via the DataHandler library. It’s made up of these components DataHandler library, plus all of the known drivers. It can support any of these databases to store its data […]

Database abstraction

DataHandler

This is the abstraction to the specific drivers and to cache described in Database abstraction with google apps script The library reference is Mj61W-201_t_zC9fJg1IzYiz3TLx7pV4j  Reference … under way The Code  cDataHandler created by GitJsonApi https://github.com/brucemcpherson/cDataHandler 0 forks. […]

Database abstraction

DataHandler REST API

Parse.com When I wrote this, i made use of Parse.com that has now disappeared and become parseplatform. As such, my codes don’t work anymore. If you are familiar with parseplatform get in touch. × Dismiss […]

No Picture
Database abstraction

Some best practise notes on DbAbstraction usage

    Since we have a lot of operations going through the database abstraction libraries nowadays (over 3 million since I released this in summer last year),  I thought I’d give a few hints. I’ll […]