Valentina for Cocoa, SQL Query with bind
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Dec 8 15:53:29 CST 2005
On 12/8/05 3:42 PM, "jaydeeonline at mac.com" <jaydeeonline at mac.com> wrote:
> From: "Justin Drury" <justin at crunch-recording.com>
> Reply-To: <justin at crunch-recording.com>
> To: <valentina-beta at lists.macserve.net>
> Subject: Missing Cocoa Functions
> X-Mailer: <IMail v8.05>
>
> Ahhh easy then...something like...
>
> NSString *query=@"select from.....ya di ya di";
>
> NSArray *myArrayOfStrings=[NSArray
> arrayWithObjects:@"string1",@"string2",nil];
> VCursor *result=[dbObject sqlSelect:query withArray:myArrayOfStrings];
Right.
> We'll just need to ensure that each object in myArrayOfStrings is [kindOfClass
> [NSString class]](and subclasses), because NSArray's can hold any core
> types(NSNumber, NSDictionary, etc).
Right, and if something else then e.g. Return error: wrong param.
> We could have an array of NSString's but NSArray is nicer memory management
> wise(in the above example NSArray is autoreleased), once an object(NSString)
> is added to an NSArray it can be released, the NSArray has added a retain
> count. Releasing(or autoreleasing) the NSArray releases the NSStrings.
> In the case of objects not being NSString's should we skip over them or raise
> an exception? And is it always a string, could it be an array of integers?
IF obj-C allow keep in array integers and strings and other types,
Then this is great.
So far only Director did allow us this.
Valentina C++ engine also allow in Bind-array have I_Values of different
types.
So again, if Obj-C allow this, we can do this.
Just you will have some switch probably to convert each array item into
corresponded I_Value
> I should read the docs!!!
>
> Justin
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina-beta
mailing list