Converting SQL delete statement to Core Data

2015-07-21 Thread Laurent Daudelin
Since there is no Core Data specific list, I thought I would ask here. I'm trying to convert the following SQL statement to Core Data: delete from SomeTable where someID not in (select someID from SomeTable group by property1, property2, property3) Basically, I want to retrieve and d

Re: Cocoa and SQL (microsoft SQL 2008)

2012-08-21 Thread Daniel Parnell
b.com/dparnell/freetds_framework Daniel On 22/08/2012, at 12:57 PM, Jens Alfke wrote: > > On Aug 21, 2012, at 7:12 PM, Jordan Burnam wrote: > >> I however have not found a way of easily interacting with a relational >> database like SQL server. I'll need to retrie

Re: Cocoa and SQL (microsoft SQL 2008)

2012-08-21 Thread Jens Alfke
On Aug 21, 2012, at 7:12 PM, Jordan Burnam wrote: > I however have not found a way of easily interacting with a relational > database like SQL server. I'll need to retrieve rows and update tables using > stored procedures. It would need to be a solution that can interact with S

Cocoa and SQL (microsoft SQL 2008)

2012-08-21 Thread Jordan Burnam
s for cocoa. I however have not found a way of easily interacting with a relational database like SQL server. I'll need to retrieve rows and update tables using stored procedures. It would need to be a solution that can interact with SQL that has become the backbone for everything we do. I have

Re: Core Data : Correct way to force reading property from sql store?

2012-01-16 Thread Jerry Krinock
On 2012 Jan 15, at 09:53, Keary Suska wrote: > I don't know that I have anything useful to say but the fact that you are > trying to fault an object inside the object itself seems like a code smell. > Or do you mean to instead do: Sorry, Keary. I oversimplified wrongly. It's actually "self"

Re: Core Data : Correct way to force reading property from sql store?

2012-01-15 Thread Steve Steinitz
Hi Jerry, On 16 Jan 12 Jerry Krinock wrote: > It seems like "gimme the latest value of object.foo from the disk" shouldn't > be so hard. It is indeed that hard, possibly for a good reason, but let's not go into that. You've correctly handled the staleness interval. You may also want to save

Re: Core Data : Correct way to force reading property from sql store?

2012-01-15 Thread Keary Suska
On Jan 14, 2012, at 2:35 PM, Jerry Krinock wrote: > I want my app to access the new value of an object's property stored in an > sqlite store, after this value has been modified on disk by another process. > > A few weeks ago, I did this, and I thought it was working: > > [[obj managedObjectC

Core Data : Correct way to force reading property from sql store?

2012-01-14 Thread Jerry Krinock
I want my app to access the new value of an object's property stored in an sqlite store, after this value has been modified on disk by another process. A few weeks ago, I did this, and I thought it was working: [[obj managedObjectContext] refreshObject:self mer

Re: Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-20 Thread Charlie Dickman
I'm entering this thread late I know and for what it's worth this may be inappropriate for what you're trying to do ... There's an encryption framework available for free from Aquatic Prime (http://aquaticmac.com/) that is intended to manage registration keys but there's no reason I can see why

Re: Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-18 Thread Kyle Sluder
On Sun, Jul 18, 2010 at 6:08 PM, Marcelo Alves wrote: > You can use the options "-nobrowse -mountrandom" on hdiutil to avoid > displaying the mounted image on Finder. Check the man page for some options. Interesting. I hadn't heard about -mountrandom before. That's helpful, but it only obscures

Re: Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-18 Thread Marcelo Alves
On 18/07/2010, at 20:22, Kyle Sluder wrote: > On Sun, Jul 18, 2010 at 3:42 AM, Darren Wheatley > wrote: >> Can anyone give me a pointer on how to encrypt (and use) the data in the >> Core Data sql store of my Mac desktop app? My application has a data store >> that on it

Re: Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-18 Thread Kyle Sluder
On Sun, Jul 18, 2010 at 3:42 AM, Darren Wheatley wrote: > Can anyone give me a pointer on how to encrypt (and use) the data in the > Core Data sql store of my Mac desktop app? My application has a data store > that on its own has a value, and I would like to provide at least a basic &

Re: Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-18 Thread Dave Carrigan
On Jul 18, 2010, at 11:25 AM, Jerry Krinock wrote: > Why does the iPhone information you found not apply to Mac apps? Because iOS 4 offers the Data Protection feature that is not available on Mac OS. As far as I know, there is no equivalent for Mac OS. You can try to roll your own encryptio

Re: Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-18 Thread Darren Wheatley
d use) the data in the Core Data sql store of my Mac desktop app? I've Googled for this, and while I find lots of information on encrypting Core Data stores for iPhone apps, I can't find a solution for Mac applications. Why does the iPhone information you found not ap

Re: Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-18 Thread Jerry Krinock
On 2010 Jul 18, at 03:42, Darren Wheatley wrote: > Can anyone give me a pointer on how to encrypt (and use) the data in the Core > Data sql store of my Mac desktop app? > I've Googled for this, and while I find lots of information on encrypting > Core Data stores for iPh

Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-18 Thread Darren Wheatley
Hi, Can anyone give me a pointer on how to encrypt (and use) the data in the Core Data sql store of my Mac desktop app? My application has a data store that on its own has a value, and I would like to provide at least a basic level of protection / deterrent before I release it. I&#x

Local Storage (SQL Database) not working in my app built with XCode

2010-05-11 Thread Adam Thorsen
I've got a minimal browser app that is linked against the WebKit framework that I'm building with XCode. I'm developing a website that uses some HTML5 local storage features, including the ability to create a local SQL database. This site works properly in in Safari and Chro

Re: predicate for a Core Data fetch request rejected by SQL

2010-03-07 Thread Jeffrey Oleander
criptors is performed in Objective-C with > access to all Cocoa's functionality, including > the comparison methods on NSString. > The SQL store, on the other hand, compiles the > predicate and sort descriptors to SQL and > evaluates the result in the database itself. > This

Re: predicate for a Core Data fetch request rejected by SQL

2010-03-06 Thread Sean McBride
On 3/5/10 5:52 PM, Mark Sanvitale said: >However, my experience seems to demonstrates that the statement "We (the >system) cannot necessarily translate "arbitrary" predicates into SQL >queries" is also true, It definitely is. >and I believe this concept should b

Re: predicate for a Core Data fetch request rejected by SQL

2010-03-06 Thread Joanna Carter
Hi Mark > Thanks all for the sharing of thoughts. Glad someone could confirm that what > I was attempting did not make sense from the SQL perspective (which I am a > newbie to). But, like Sean wrote, Core Data seems to be presented as an > abstraction ABOVE the layer which im

Re: predicate for a Core Data fetch request rejected by SQL

2010-03-05 Thread Mark Sanvitale
Thanks all for the sharing of thoughts. Glad someone could confirm that what I was attempting did not make sense from the SQL perspective (which I am a newbie to). But, like Sean wrote, Core Data seems to be presented as an abstraction ABOVE the layer which implements the actual storage

Re: predicate for a Core Data fetch request rejected by SQL

2010-03-05 Thread Joanna Carter
Hi Sean > But you shouldn't have to... Core Data is "not a database" and its use > of SQL is an implementation detail. One shouldn't have to know anything > about SQL to use Core Data. Of course, in practice, such knowledge is > helpful, as you say. You have a

Re: predicate for a Core Data fetch request rejected by SQL

2010-03-05 Thread Sean McBride
string (which is inserted into the predicate >via the fetch-request-template variable substitution). This fetch >executes just fine on an XML store. The same fetch on an SQL store >yields: unimplemented SQL generation for predicate ("/Volumes/MacHD/ >Applications/Utilities" BEG

Re: predicate for a Core Data fetch request rejected by SQL

2010-03-05 Thread Joanna Carter
o the predicate via the > fetch-request-template variable substitution). This fetch executes just fine > on an XML store. The same fetch on an SQL store yields: unimplemented SQL > generation for predicate ("/Volumes/MacHD/Applications/Utilities" BEGINSWITH > path). You

predicate for a Core Data fetch request rejected by SQL

2010-03-05 Thread Mark Sanvitale
RANT AGAINST DOCUMENTATION: I have searched (a lot) and found various other pleas for help of the form, "I am trying to do a Core Date fetch on an SQL-backed store and it is failing because something is wrong with my predicate." I thought some investigate could promote my plea b

Re: NSPersistentDocument, Garbage Collection and SQL Store

2009-11-22 Thread Sean McBride
jonat...@mugginsoft.com (jonat...@mugginsoft.com) on 2009-11-22 9:08 AM said: >Under 10.5.6 there were acknowledged issues with the magic combination >of Core Data, Garbage Collection and NSPersistentDocument SQL Store. >See http://lists.apple.com/archives/Cocoa-dev/2009/Feb/msg00176.

NSPersistentDocument, Garbage Collection and SQL Store

2009-11-22 Thread jonat...@mugginsoft.com
Under 10.5.6 there were acknowledged issues with the magic combination of Core Data, Garbage Collection and NSPersistentDocument SQL Store. See http://lists.apple.com/archives/Cocoa-dev/2009/Feb/msg00176.html I cannot see a ref for this in the release notes for 10.6. Was the issue resolved in

Re: CoreData SQL tracing in the iPhone Simulator...

2009-09-23 Thread Brian Bruinewoud
:44 , Sean McBride wrote: On 9/22/09 9:23 PM, Brian Bruinewoud said: Sorry for asking this but I was unable to find this in the archives even though I know I read it here before. How can I turn on logging/tracing of the SQL statements issued by CoreData? I need this for an iPhone app runn

Re: CoreData SQL tracing...

2009-09-22 Thread Sean McBride
On 9/22/09 9:23 PM, Brian Bruinewoud said: >Sorry for asking this but I was unable to find this in the archives >even though I know I read it here before. > >How can I turn on logging/tracing of the SQL statements issued by >CoreData? I need this for an iPhone app running i

CoreData SQL tracing...

2009-09-22 Thread Brian Bruinewoud
Sorry for asking this but I was unable to find this in the archives even though I know I read it here before. How can I turn on logging/tracing of the SQL statements issued by CoreData? I need this for an iPhone app running in the simulator. Thanks, Brian

Re: CoreData / SQL hang on save

2009-09-19 Thread Greg Hoover
hood) Regards Anthony Mittaz Thanks for you response. The problem actually just started showing up in 10.6 (wasn't a problem in 10.4 or 10.5). :-/ The hang stopped for a few launches and reverted to its previous output: "binding not implemented for SQLType 7". But then i

Re: Finder-style sorting and the SQL Core Data store, best practice?

2009-09-02 Thread Dave Fernandes
nowLeopard supports those! Could you elaborate on performance implications? Does the SQL layer now support fancy sorting? Or is fancy sorting done after results are retrieved from the database? Alas, I must support ppc so I'd still be interested to know how to subclass NSArray

Re: Finder-style sorting and the SQL Core Data store, best practice?

2009-09-01 Thread Sean McBride
Melissa, Thanks for your speedy reply. That's great news that SnowLeopard supports those! Could you elaborate on performance implications? Does the SQL layer now support fancy sorting? Or is fancy sorting done after results are retrieved from the database? Alas, I must support ppc s

Re: Finder-style sorting and the SQL Core Data store, best practice?

2009-09-01 Thread Melissa J. Turner
As of SnowLeopard, Core Data supports the following selectors for sorting in the SQLite store: compare: (since Tiger(I think)) caseInsensitiveCompare: (since Leopard) localizedCompare: (new in SL) localizedCaseInsensitiveCompare: (new in SL) localizedStandardCompare: (new in SL) The last compa

Finder-style sorting and the SQL Core Data store, best practice?

2009-09-01 Thread Sean McBride
Hi all, The "Troubleshooting Core Data" document discusses the FAQ "SQLite store does not work with sorting". It suggests: "you may need to subclass NSArrayController so you can have it not pass the sort descriptors to the database and instead do the sorting after your data has been fetched". [1]

Re: CoreData / SQL hang on save

2009-08-25 Thread Melissa J. Turner
roblem actually just started showing up in 10.6 (wasn't a problem in 10.4 or 10.5). :-/ The hang stopped for a few launches and reverted to its previous output: "binding not implemented for SQLType 7". But then it happened again... The SQL file does not have null values for a

Re: CoreData / SQL hang on save

2009-08-25 Thread Greg Hoover
Hi Melissa, Thanks for you response. The problem actually just started showing up in 10.6 (wasn't a problem in 10.4 or 10.5). :-/ The hang stopped for a few launches and reverted to its previous output: "binding not implemented for SQLType 7". But then it happened ag

Re: CoreData / SQL hang on save

2009-08-25 Thread Melissa J. Turner
On Aug 25, 2009, at 02:19, Greg Hoover wrote: I've run into a hang in CoreData save. I'm the single coordinator, multiple object contexts threading model and a SQL store (though it seems to happen with XML as well). The hang occurs inside the NSSQLCore and seems to just loop

CoreData / SQL hang on save

2009-08-25 Thread Greg Hoover
I've run into a hang in CoreData save. I'm the single coordinator, multiple object contexts threading model and a SQL store (though it seems to happen with XML as well). The hang occurs inside the NSSQLCore and seems to just loop endlessly. The SQL output supports this.

Re: Clarification of NSPredicate constraints for Core Data SQL store

2009-06-30 Thread Melissa J. Turner
t will support multiple keypaths each of which contains a single to-many (your performance will probably stink because you're doing lots of joins) All of these are true for Leopard and SnowLeopard, and may or may not continue to be true into the future, as the SQL generation is a w

Clarification of NSPredicate constraints for Core Data SQL store

2009-06-30 Thread Barry Wark
In the "Constraints and Limitations" section of the Predicate Programming Guide (http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/Articles/pBasics.html#//apple_ref/doc/uid/TP40001792-249799), the second bullet states than only one operator (ALL, IN, ANY) and only one instance of

Re: SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO

2009-06-01 Thread Sean McBride
On 6/1/09 3:01 PM, Ben Trumbull said: >> Now that 10.5.7 (allegedly) fixes the incompatibilities between the >> SQL >> store and GC apps, I have been trying to switch from XML to SQL. Most >> problems I've fixed, but I'm getting an exception: > >Yes, 10

re: SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO

2009-06-01 Thread Ben Trumbull
Now that 10.5.7 (allegedly) fixes the incompatibilities between the SQL store and GC apps, I have been trying to switch from XML to SQL. Most problems I've fixed, but I'm getting an exception: Yes, 10.5.7 fixes all the known issues with (GC, NSDocument, NSSQLiteSt

SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO

2009-06-01 Thread Sean McBride
Hi all, Now that 10.5.7 (allegedly) fixes the incompatibilities between the SQL store and GC apps, I have been trying to switch from XML to SQL. Most problems I've fixed, but I'm getting an exception: "statement is still active" See backtrace below. I've search the ar

Re: Core Data, Garbage Collection and SQL Store

2009-02-03 Thread Ben Trumbull
On Jan 30, 2009, at 9:37 AM, Sean McBride wrote: On 1/30/09 9:14 AM, Kevin Ross said: It has recently come up on the list again about a known issue when using Core Data + G.C. + SQL NSPersistantDocumentStore. I have a document based application that I am about to release where I have been

Re: Core Data, Garbage Collection and SQL Store

2009-01-31 Thread Kevin Ross
significant slowdown when writing atomically versus w/ SQL. -K On Jan 30, 2009, at 3:09 PM, Kevin Ross wrote: On Jan 30, 2009, at 3:02 PM, Sean McBride wrote: On 1/30/09 2:49 PM, Kevin Ross said: If it's not too much trouble are you able to send me your repro project? I'm wo

Re: Core Data, Garbage Collection and SQL Store

2009-01-30 Thread Kevin Ross
On Jan 30, 2009, at 3:02 PM, Sean McBride wrote: On 1/30/09 2:49 PM, Kevin Ross said: If it's not too much trouble are you able to send me your repro project? I'm wondering why it's not happening with my project anymore. I'm afraid the bug I filed contains not a simple test project, but

Re: Core Data, Garbage Collection and SQL Store

2009-01-30 Thread Sean McBride
On 1/30/09 2:49 PM, Kevin Ross said: >If it's not too much trouble are you able to send me your repro project? >I'm wondering why it's not happening with my project anymore. I'm afraid the bug I filed contains not a simple test project, but my entire (unreleased) application. I wanted to be sure

Re: Core Data, Garbage Collection and SQL Store

2009-01-30 Thread Kevin Ross
On Jan 30, 2009, at 9:37 AM, Sean McBride wrote: On 1/30/09 9:14 AM, Kevin Ross said: It has recently come up on the list again about a known issue when using Core Data + G.C. + SQL NSPersistantDocumentStore. I have a document based application that I am about to release where I have been

Re: Core Data, Garbage Collection and SQL Store

2009-01-30 Thread Sean McBride
On 1/30/09 9:14 AM, Kevin Ross said: >It has recently come up on the list again about a known issue when >using Core Data + G.C. + SQL NSPersistantDocumentStore. I have a >document based application that I am about to release where I have >been using this exact combination through

Re: Core Data, Garbage Collection and SQL Store

2009-01-30 Thread jonat...@mugginsoft.com
On 30 Jan 2009, at 17:14, Kevin Ross wrote: Hi all, It has recently come up on the list again about a known issue when using Core Data + G.C. + SQL NSPersistantDocumentStore. I have a document based application that I am about to release where I have been using this exact combination

Core Data, Garbage Collection and SQL Store

2009-01-30 Thread Kevin Ross
Hi all, It has recently come up on the list again about a known issue when using Core Data + G.C. + SQL NSPersistantDocumentStore. I have a document based application that I am about to release where I have been using this exact combination through it's entire development. I

Re: How to manage (My)SQL data in Cocoa

2008-11-10 Thread mmalcolm crawford
On Nov 10, 2008, at 12:39 PM, dreamcat7 wrote: Sorry maybe i should have clarified that but i believed that Quincey had already explained about the datasource methods. You *must* (if you dont want to end up in a heap of self-inflicted mess) represent your data in those way - WHEN you inten

Re: How to manage (My)SQL data in Cocoa

2008-11-10 Thread dreamcat7
Hi, Sorry maybe i should have clarified that but i believed that Quincey had already explained about the datasource methods. You *must* (if you dont want to end up in a heap of self-inflicted mess) represent your data in those way - WHEN you intend to link to an NSTableView using bindings.

Re: How to manage (My)SQL data in Cocoa

2008-11-10 Thread I. Savant
On Mon, Nov 10, 2008 at 1:48 PM, mmalcolm crawford <[EMAIL PROTECTED]> wrote: > NSTableView does not place any restriction on the way its data is > *represented*, just how it is *provided*. The more important point of focus here is that the *NSTableDataSource protocol* exists precisely *because

Re: How to manage (My)SQL data in Cocoa

2008-11-10 Thread mmalcolm crawford
On Nov 10, 2008, at 7:36 AM, dreamcat7 wrote: For NSTableView you MUST follow Quincey's conventions for the data representation. No, you don't. Quincey's statement that "the most natural "fit" with a NSTableView would probably be an array of dictionaries" is true, but there is no *need*

Re: How to manage (My)SQL data in Cocoa

2008-11-10 Thread dreamcat7
ch as NSArrayController (and NSSortDescriptors for sorting) and perhaps certain parts of the Bindings / KVC will become relevant to you. The following libraries are for executing basic SQL query from within the Cocoa environment and conveniently they can provide data into the NSArra

Re: How to manage (My)SQL data in Cocoa

2008-11-09 Thread Quincey Morris
really don't like this). So, I was wondering if there's a "standard" way for storing sql data (not sqlite and core data of course..) with Cocoa collections. For example, I have thought to a NSDictionary with id integers as key and NSArrays with the rest of the *row*

How to manage (My)SQL data in Cocoa

2008-11-09 Thread Michele Barboni
f there's a "standard" way for storing sql data (not sqlite and core data of course..) with Cocoa collections. For example, I have thought to a NSDictionary with id integers as key and NSArrays with the rest of the *row* as values, sounds better but since I'm not an exp

Re: Core Data, SQL stores, and predicate restrictions

2008-05-16 Thread Bill Dudney
t the docs to clear that up. HTH, -bd- http://bill.dudney.net/roller/objc On May 16, 2008, at 3:50 PM, Sean McBride wrote: Hi all, After reading the docs and archives, it is clear to me now that with Core Data's SQL store one is more limited in the types of predicates one can use wi

Core Data, SQL stores, and predicate restrictions

2008-05-16 Thread Sean McBride
Hi all, After reading the docs and archives, it is clear to me now that with Core Data's SQL store one is more limited in the types of predicates one can use with fetches. What I can't find is a list of what I can and can't do. The best I found was "[the] SQL store, on the

Re: SQL

2008-05-06 Thread Johannes Huning
On May 6, 2008, at 12:45 PM, I. Savant wrote: Fields.Is there any help or documentation available for using cocoaMysql? Have you expended at least a little researching effort and looked at the CocoaMySQL web site or googled "CocoaMySQL documentation"? There's even example code in the s

Re: SQL

2008-05-06 Thread lbland
On May 6, 2008, at 2:44 AM, vinitha ks wrote: I'm trying to do some database applications using cocoaMySql framework.This is my first database application. could connect with the database,and accesses the table of particular databases.But i couldn't access Fields.Is there any help or docum

Re: SQL

2008-05-06 Thread I. Savant
Fields.Is there any help or documentation available for using cocoaMysql? Have you expended at least a little researching effort and looked at the CocoaMySQL web site or googled "CocoaMySQL documentation"? There's even example code in the same place ... -- I.S. _

SQL

2008-05-05 Thread vinitha ks
hi, I'm trying to do some database applications using cocoaMySql framework.This is my first database application. could connect with the database,and accesses the table of particular databases.But i couldn't access Fields.Is there any help or documentation available for using cocoaMysql?I didn't