TitaniORM icon indicating copy to clipboard operation
TitaniORM copied to clipboard

table agnostic

Open kevinetienne opened this issue 14 years ago • 0 comments

Hi,

What about changing the code to set different tables? I'm manipulating database with several tables and it would be useful to open a database and make transactions on those tables. What do you think?

Ex:

  myDb = db("my_database");
  myCursorForUsers = db.openTable("users");
  myCursorForEntries = db.openTable("entries");
  // or
  ....

  myCursorForUsers.save({ first_name: 'James', last_name: 'Hall' });
  myCursorForEntries.save({ title: 'First entry', description: 'Some content here' });

Any ideas? thought?

Thanks Kévin

kevinetienne avatar Jul 22 '11 08:07 kevinetienne