What to expect from Valentina Cocoa?

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Dec 9 13:56:12 CST 2005


On 12/9/05 9:55 AM, "Philip Mötteli" <philip.moetteli at econophone.ch> wrote:

Hi Philip, 

>> REALbasic:
>> 
>>     // full form
>>         dim arr as Strings(10)
>>         arr(0) = new String( "123" )
>> 
>>         db.SqlSelect( query, arr )
>> 
>> 
>>     // short form:
>> 
>>         db.SqlSelect( query, Array("123") )
>> 
>> 
>> Director:
>> 
>>         db.SqlSelect( query, ["123"] )
>> 
>> Obj-C
>> 
>>         ?
> 
> db.SqlSelect(query, [NSArray arrayWithObjects:s1, s2, s3, nil]);

Excellent. 
 
Justin have implement binding yesterday.


> So what I have understood so far, is that persistent objects have to
> inherit from a common superclass (VObject)?

I think no. Justin?

I think Justin have told that HIS classes as Vdatabase, Vcrusor, Vfield are
inherited from Vobject.


> Do I also have to send SQL myself or is that automatically taken care of?

I think both ways can be used

> Do I have to define a model, that defines realtionships and attributes of the
> persistent classes?

Model? You mean like in CoreData?

Valentina is not plugged into CoreData.
Database structure is defined via your code.

Something like this (I will write in C++ code, okay?)

-----------------------------------------------------------
void CreateMyDatabase
{
    Vdatabase* pdb = Valentina.CreateDatabase();

    pDB.Create()        // create it on disk

    CreateStructure( pdb );

}

Now you have choices. You can use API way or SQL way

-----------------------------------------------------------
// API way:
Void CreateStructure( Vdatabase* pdb )
{
    I_Table* pPerson = pdb->CreateTable( "Person" );

    pPerson->CreateVarCharField( "f1", 1022, fIndexed );
}

-----------------------------------------------------------
// SQL way:
Void CreateStructure( Vdatabase* pdb )
{
    String query = "CREATE TABLE Person( f1 VarChar[1022] INDEXED )";

    pDB->SqlExecute( query );
}


Well, I think I will ask Sergey to spend some time and start develop
examples of Valentina for Cocoa.


-- 
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