[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    [asterisk-dev] [design] Realtime changes
From:       Tilghman Lesher <tilghman () mail ! jeffandtilghman ! com>
Date:       2008-12-31 21:07:11
Message-ID: 200812311507.11051.tilghman () mail ! jeffandtilghman ! com
[Download RAW message or body]

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

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic