diff options
author | Urban Müller | 2012-11-01 13:57:28 +0000 |
---|---|---|
committer | Urban Müller | 2012-11-01 13:57:28 +0000 |
commit | 2bd1adf0e007d8024d3a8f0c038d94d93e9ed819 (patch) | |
tree | dcb389db07ec952aa83a53b57f6d26659bcbee27 /it_dbi.class | |
parent | 1dccb8ce3b85438401de8a43a18bfb3c7a0a3576 (diff) | |
download | itools-2bd1adf0e007d8024d3a8f0c038d94d93e9ed819.tar.gz itools-2bd1adf0e007d8024d3a8f0c038d94d93e9ed819.tar.bz2 itools-2bd1adf0e007d8024d3a8f0c038d94d93e9ed819.zip |
better function naming
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/it_dbi.class b/it_dbi.class index 89b641f..1bb36e0 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -684,10 +684,11 @@ function replace($tags = array()) /** - * Update a record (efficiently) or create it if missing + * Create a record like replace(), but optimize if similar or identical record already exists + * MUST GIVE ALL FIELDS INCLUDING ID * @param $tags key => value pairs to set */ -function store($tags = array()) +function smart_replace($tags = array()) { return $tags[$this->_p['keyfield']] && $this->read($tags[$this->_p['keyfield']]) ? $this->update($tags) : $this->replace($tags); } |