[asterisk-dev] [design] Realtime changes
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Wed Dec 31 15:07:11 CST 2008
Once again, I am proposing some realtime changes, this time in the quest
to make voicemail ODBC storage completely dependent upon realtime, instead
of containing its own set of ODBC commands. This may eventually allow us to
make even IMAP a realtime backend of sorts.
The two APIs that I am proposing adding are as follows:
ast_copy_realtime("family",
<criteria>, SENTINEL,
<field-list>, SENTINEL,
<new-fields>, SENTINEL)
where <criteria> is a set of pairs of data, with at least one pair
specified, detailing the criteria for selection of a row to copy; <field-list>
is a list of fields to copy directly; and <new-fields> is a set of data pairs,
specifying field names and values to insert along with the fields that are
being copied. For SQL-based databases, this command roughly translates
to:
INSERT INTO "family" (<field-list>,<new-fields-names>) SELECT
<field-list>,<new-fields-values> FROM "family" WHERE <criteria>;
where <new-fields> are separated into their respective field names and
field values.
ast_blobupdate_realtime("family",
<criteria-pairs>, SENTINEL,
<field-name>, <blob-value>, <blob-len>, SENTINEL)
This should allow us to store Binary Large OBjects into the realtime database
without needing to worry about embedded NULLs in the data.
Anybody feel strongly that I should do either of these a different way?
--
Tilghman
More information about the asterisk-dev
mailing list