[odb-users] Re: Optional PRAGMA_DB (id)

Вячеслав Спиридонов art at it-gen.net
Fri Oct 7 08:29:07 EDT 2011


Dear, Boris and odb-users

With the above restrictions do not have any problems. I will say more
than this is exactly what we need! Because it is a separate set of
tasks - logging of certain events in the project. So we should
regularly save a new data (the data are generated directly on the
fly), and optionally delete on a given criterion of old data. Deleting
not even required, so as to regulate size of logs and can be outside.
Also it is normally to not allocate logs.

Of course as a "repository" of logs do not necessarily use the
database. But we want to keep logs in a structured form, so to them it
was easy to access from outside (not from the main project).

Thus it is important to dbo supported interfaces persist () and
erase_query (). The fact that an additional interface will query () -
only plus:)

In the above example, it still sounds like - all entrances of players
are necessary to log in a project of the last month.


Best regards,
Viacheslav and sba

6 октября 2011 г. 14:02 пользователь Boris Kolpackov
<boris at codesynthesis.com> написал:
> Hi Viacheslav,
>
> Вячеслав Спиридонов <art at it-gen.net> writes:
>
>> So formulation of the problem: we need logged all visits of players.
>> We will record PlayerId and Date. Us in the future there is no need to
>> carry out any action which would require PRIMARY KEY.
>>
>> CREATE TABLE IF NOT EXISTS `players_enter` (
>>   `PlayerId` INT (10) NOT NULL,
>>   `Date` date NOT NULL
>> ) ENGINE = MyISAM;
>
> Yes, I remember you asked for support for objects without ids some time
> ago. I did more thinking on this feature and I believe we can probably
> support this. Such objects, however, will have a number of limitations,
> biggest of which is that you won't be able to update such objects using
> the database::update() function. This is probably not an issue in your
> case, but I just want to confirm.
>
> Essentially, one will be able to persist such objects using the persist()
> function, load them using query() (load()/find() will not be supported)
> and delete such objects using erase_query() (again, normal erase() will
> be unavailable). Let me know if you see any problems with these
> limitations.
>
> Boris
>



More information about the odb-users mailing list