rtree/retrieveAllZipcode.c
                                            
                                            {
                                                    
                                                    RDM_CURSOR cursor = NULL;
                                                        POINTSOFINTEREST poi = {0};
                                                    RDM_RTREE_KEY key = {0};
                                                    /* Set key lookup information */
                                                    
                                                    
                                                    /* Start an update transaction */
                                                    
                                                    
                                                    if (rc == sOKAY)
                                                        {
                                                    /* Get a cursor based on the r-tree key information */
                                                    
                                                    
                                                                db, KEY_POINTSOFINTEREST_LOCATION, &key, &cursor);
                                                    if (rc == sOKAY)
                                                            {
                                                    /* Move to the first (should be only) row in the cursor */
                                                    
                                                                rc = rdm_cursorMoveToFirst (cursor);
                                                    while (rc == sOKAY)
                                                                {
                                                    /* Read the row */
                                                    
                                                                    rc = rdm_cursorReadRow (
                                                                        cursor, &poi, sizeof (POINTSOFINTEREST), NULL);
                                                    if (rc == sOKAY)
                                                                    {
                                                                        rc = rdm_cursorMoveToNext (cursor);
                                                                    }
                                                                }
                                                    /* We expect to break out of the while loop with sENDOFCURSOR */
                                                    
                                                    
                                                                {
                                                                    rc = sOKAY;
                                                                }
                                                    /* Free the cursor */
                                                    
                                                                (void) rdm_cursorFree (cursor);
                                                            }
                                                    /* End the read transaction (free locks) */
                                                    
                                                            (void) rdm_dbEnd (db);
                                                        }
                                                    return rc;
                                                    }
                                                RDM_RETCODE rdm_dbStartRead(RDM_DB db, const RDM_TABLE_ID *tableIds, uint32_t numTableIds, RDM_TRANS *pTrans)
                                            Get read locks.
                                        RDM_RETCODE rdm_cursorReadRow(RDM_CURSOR cursor, void *colValues, size_t bytesIn, size_t *bytesOut)
                                            Read all columns from a row.
                                        RDM_RETCODE rdm_dbGetRowsByKeyInRtreeKeyRange(RDM_DB db, RDM_KEY_ID keyId, const RDM_RTREE_KEY *keyValue, RDM_CURSOR *pCursor)
                                            Associate an RDM_CURSOR with a row set based on a R-tree.