Comments (5)
Isn't simple while ([result next])
shorter? :)
from fmdb.
It's not that obvious.
I spent some time searching and reading main.m to find out that you have to invoke [ result next ] to read the first record.
In fact, I'm ok with while ([result next]) but it would be NICE to have Objective-C fast enumeration support.
from fmdb.
To say it's not obvious is a bit dramatic. It's right there in the readme under "Executing Queries:"
https://github.com/ccgus/fmdb/blob/master/README.markdown
I've thought about adding fast enumeration in the past, but I didn't seen the benefits to it. If someone wrote a patch for it and came up with some nice examples, I would reconsider it.
from fmdb.
My bad. Instead of the readme I've considered the "main.m" code.
Anyway, the semantic of FMResultSet seems a bit strange. It represents both a set and an iterator for it at the same time. And iterator semantic is closer to the one used in Java world. It's not similar either to ObjC fast enumeration or to STL style iterators.
If underlying SQLite API enforces this kind of behaviour - so be it.
from fmdb.
I'll see if I'll be able to do anything about a patch. However, I'm a bit busy at the moment.
And @ccgus, thank you for a great library.
from fmdb.
Related Issues (20)
- Facing memory issue while fetching large data from db and app get crashed without crash log HOT 1
- Application getting crashed on FMDB: -[FMResultSet nextWithError:] + 48 HOT 2
- Multiple commands produce in XCode - 13
- online crash HOT 2
- Unable to install the latest podversion of FMDB and SQLCipher HOT 3
- Swift: result of executeUpdate() - did it update or not? Count of updated records? HOT 3
- no such function: sqlcipher_export in "SELECT sqlcipher_export('encrypted');" HOT 1
- - (BOOL)setKey:(NSString*)key; is not work HOT 3
- Flutter support
- When will the new version be released? HOT 2
- I crashed while using FMDB/SQLCipher. HOT 2
- Crash -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] EXC_BAD_ACCESS (KERN_INVALID_ADDRESS) HOT 2
- FMDB accidental crash [FMStatement close] Xcode14.2 FMDB 2.5 HOT 7
- Error with Xcode 14.3 because of deployment_target (9.0) HOT 4
- Client XPC connection invalidated HOT 1
- Unknown error tcp_output/flags HOT 3
- Can the current version be used stably? HOT 3
- closing FMDB database HOT 11
- Support for visionOS HOT 6
- Apple Privacy Manifest HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmdb.