remirobert / camembert Goto Github PK
View Code? Open in Web Editor NEWUse sqlite3 for iOS and OS X simply.
License: MIT License
Use sqlite3 for iOS and OS X simply.
License: MIT License
Gents: Good job on this little frame-work. As you know, Swift 2 discontinued "reflect" and introduced "Mirror" class instead. I've changed your wonderful code and made it Swift-2 compliant. If you want, I can submit the code here.
Kind regards.
File: Camembert.swift
Method: getObjectsWithQuery
line 97 should be (replace "sqlite3_column_int" with "sqlite3_column_double")
case SQLITE_FLOAT:
currentObject.setValue((Float(sqlite3_column_double(ptrRequest,
CInt(index))) as AnyObject), forKey: columName)
class Person : CamembertModel {
var name: String?
}
it will be awesome to make a framework with all dependencies, for simple integration. I tried, and i didn't get success to build one.
Camembert seems to save an NSDate as a string, and when I retrieve the date from the database I expect it to be an NSDate back again, but it's not. How do I solve this problem?
Hi, I faced an issue in this function:
it is always returning nil when project name includes spaces, for example if my project is called "My App" the return result will be nil. If I know Objective-C I would have helped fixing it ๐
id camembertCreateObject(NSString *nameClass) {
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
NSString *classStringName = [NSString stringWithFormat:@"_TtC%lu%@%lu%@", (unsigned long)appName.length,
appName, (unsigned long)nameClass.length, nameClass];
Class customClass = NSClassFromString(classStringName);
if (customClass == nil) {
return nil;
}
return [[customClass alloc] init];
}
I have a model name Ingredient having name, brand, cost
When I _initWithId some ingredient the object that I get is of type "Ingredient" but it's properties are not returned in the correct way. i.e. when I access .name it returns empty, but when access .brand it returns the name and on .cost it returns the brand.. simple it does the following
.name = ""
.brand = .name
.cost = .brand
.cost = (Only God knows)
Does anybody understand this error? Can anyone please help me with it, I have tried to make a breakpoint in CamembertModel.swift and try to track down the error but no luck..
I got an "unexpectedly found nil while unwrapping an Optional value" error at "DataAccess.access.DbPath get".
"initDataBase(databaseFolder: String, nameDatabase :String)" is working, though.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.