diff options
author | Robert G. Jakabosky <bobby@sharedrealm.com> | 2012-06-21 11:06:20 -0700 |
---|---|---|
committer | Robert G. Jakabosky <bobby@sharedrealm.com> | 2012-06-21 11:06:20 -0700 |
commit | 2c920a74a9653adb625070a5f416f6394aae8147 (patch) | |
tree | ca35ffd1c9edfb93420e32eb473fd19d19eef93c /docs/modules/ODB.html | |
parent | c5b97353696f5d82ca15f69f00f6c4c54fb2afba (diff) | |
download | luagit2-2c920a74a9653adb625070a5f416f6394aae8147.tar.gz |
Commit generated API docs.
Diffstat (limited to 'docs/modules/ODB.html')
-rw-r--r-- | docs/modules/ODB.html | 656 |
1 files changed, 656 insertions, 0 deletions
diff --git a/docs/modules/ODB.html b/docs/modules/ODB.html new file mode 100644 index 0000000..1076315 --- /dev/null +++ b/docs/modules/ODB.html @@ -0,0 +1,656 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html> +<head> + <title>Reference</title> + <link rel="stylesheet" href="../luadoc.css" type="text/css" /> + <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> +</head> + +<body> +<div id="container"> + +<div id="product"> + <div id="product_logo"></div> + <div id="product_name"><big><b></b></big></div> + <div id="product_description"></div> +</div> <!-- id="product" --> + +<div id="main"> + +<div id="navigation"> + + +<h1>LuaDoc</h1> +<ul> + + <li><a href="../index.html">Index</a></li> + +</ul> + + +<!-- Module list --> + +<h1>Modules</h1> +<ul> + + <li> + <a href="../modules/Blob.html">Blob</a> + </li> + + <li> + <a href="../modules/Commit.html">Commit</a> + </li> + + <li> + <a href="../modules/Config.html">Config</a> + </li> + + <li> + <a href="../modules/Index.html">Index</a> + </li> + + <li> + <a href="../modules/IndexEntry.html">IndexEntry</a> + </li> + + <li> + <a href="../modules/IndexEntryUnmerged.html">IndexEntryUnmerged</a> + </li> + + <li><strong>ODB</strong></li> + + <li> + <a href="../modules/ODBBackend.html">ODBBackend</a> + </li> + + <li> + <a href="../modules/OID.html">OID</a> + </li> + + <li> + <a href="../modules/OID_Shorten.html">OID_Shorten</a> + </li> + + <li> + <a href="../modules/Object.html">Object</a> + </li> + + <li> + <a href="../modules/OdbObject.html">OdbObject</a> + </li> + + <li> + <a href="../modules/Reference.html">Reference</a> + </li> + + <li> + <a href="../modules/Repository.html">Repository</a> + </li> + + <li> + <a href="../modules/RevWalk.html">RevWalk</a> + </li> + + <li> + <a href="../modules/Signature.html">Signature</a> + </li> + + <li> + <a href="../modules/StrArray.html">StrArray</a> + </li> + + <li> + <a href="../modules/Tag.html">Tag</a> + </li> + + <li> + <a href="../modules/Tree.html">Tree</a> + </li> + + <li> + <a href="../modules/TreeEntry.html">TreeEntry</a> + </li> + + <li> + <a href="../modules/git2.html">git2</a> + </li> + +</ul> + + + +<!-- File list --> + + + + + + +</div><!-- id="navigation" --> + +<div id="content"> + +<h1>Module <code>ODB</code></h1> + +<p>Class "ODB". </p> + + + + + +<h2>Functions</h2> +<table class="function_list"> + + <tr> + <td class="name" nowrap><a href="#ODB.hash">ODB.hash</a> (data, otype)</td> + <td class="summary">module function.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB.hashfile">ODB.hashfile</a> (path, otype)</td> + <td class="summary">module function.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB.new">ODB.new</a> ()</td> + <td class="summary">Create a new ODB object.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB.open">ODB.open</a> (object_dir)</td> + <td class="summary">Create a new ODB object.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB:add_alternate">ODB:add_alternate</a> (backend, priority)</td> + <td class="summary">object method.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB:add_backend">ODB:add_backend</a> (backend, priority)</td> + <td class="summary">object method.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB:exists">ODB:exists</a> (id)</td> + <td class="summary">object method.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB:free">ODB:free</a> ()</td> + <td class="summary">Destroy this object (will be called by Garbage Collector).</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB:read">ODB:read</a> (id)</td> + <td class="summary">object method.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB:read_header">ODB:read_header</a> (id)</td> + <td class="summary">object method.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB:read_prefix">ODB:read_prefix</a> (short_id, len)</td> + <td class="summary">object method.</td> + </tr> + + <tr> + <td class="name" nowrap><a href="#ODB:write">ODB:write</a> (data, type)</td> + <td class="summary">object method.</td> + </tr> + +</table> + + + + + + +<br/> +<br/> + + + +<h2><a name="functions"></a>Functions</h2> +<dl class="function"> + + + +<dt><a name="ODB.hash"></a><strong>ODB.hash</strong> (data, otype)</dt> +<dd> +module function. <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_hash">git_odb_hash</a>:<p><p>The resulting SHA-1 OID will the itentifier for the data buffer as if the data buffer it were to written to the ODB. + + +<h3>Parameters</h3> +<ul> + + <li> + data: data to hash. Must be of type <code>string</code>. + </li> + + <li> + otype: Must be of type <code>integer</code>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><a href="OID.html">OID</a> or <code>nil</code> on error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB.hashfile"></a><strong>ODB.hashfile</strong> (path, otype)</dt> +<dd> +module function. <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_hashfile">git_odb_hashfile</a>:<p><p> + + +<h3>Parameters</h3> +<ul> + + <li> + path: file to read and determine object id for. Must be of type <code>string</code>. + </li> + + <li> + otype: Must be of type <code>integer</code>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><a href="OID.html">OID</a> or <code>nil</code> on error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB.new"></a><strong>ODB.new</strong> ()</dt> +<dd> +Create a new ODB object. <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_new">git_odb_new</a>:<p><p>Before the ODB can be used for read/writing, a custom database backend must be manually added using `git_odb_add_backend()` + + + + + + + +<h3>Return values:</h3> +<ol> + + <li><a href="ODB.html">ODB</a> or <code>nil</code> on error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB.open"></a><strong>ODB.open</strong> (object_dir)</dt> +<dd> +Create a new ODB object. <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_open">git_odb_open</a>:<p><p>- git_odb_backend_loose: read and write loose object files from disk, assuming `objects_dir` as the Objects folder<p> - git_odb_backend_pack: read objects from packfiles, assuming `objects_dir` as the Objects folder which contains a 'pack/' folder with the corresponding data + + +<h3>Parameters</h3> +<ul> + + <li> + object_dir: Must be of type <code>string</code>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><a href="ODB.html">ODB</a> or <code>nil</code> on error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB:add_alternate"></a><strong>ODB:add_alternate</strong> (backend, priority)</dt> +<dd> +object method. + + +<h3>Parameters</h3> +<ul> + + <li> + backend: Must be of type <a href="ODBBackend.html">ODBBackend</a>. + </li> + + <li> + priority: Must be of type <code>integer</code>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><code>true</code> if no error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB:add_backend"></a><strong>ODB:add_backend</strong> (backend, priority)</dt> +<dd> +object method. + + +<h3>Parameters</h3> +<ul> + + <li> + backend: Must be of type <a href="ODBBackend.html">ODBBackend</a>. + </li> + + <li> + priority: Must be of type <code>integer</code>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><code>true</code> if no error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB:exists"></a><strong>ODB:exists</strong> (id)</dt> +<dd> +object method. <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_exists">git_odb_exists</a>:<p><p>@return - 1, if the object was found - 0, otherwise + + +<h3>Parameters</h3> +<ul> + + <li> + id: the object to search for.. Must be of type <a href="OID.html">OID</a>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><code>true</code> if no error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB:free"></a><strong>ODB:free</strong> ()</dt> +<dd> +Destroy this object (will be called by Garbage Collector). <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_free">git_odb_free</a>:<p><p> + + + + + + + + + +</dd> + + + + +<dt><a name="ODB:read"></a><strong>ODB:read</strong> (id)</dt> +<dd> +object method. <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_read">git_odb_read</a>:<p><p>This method queries all available ODB backends trying to read the given OID.<p> The returned object is reference counted and internally cached, so it should be closed by the user once it's no longer in use.<p> @return - 0 if the object was read; - GIT_ENOTFOUND if the object is not in the database. + + +<h3>Parameters</h3> +<ul> + + <li> + id: identity of the object to read.. Must be of type <a href="OID.html">OID</a>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><a href="OdbObject.html">OdbObject</a> or <code>nil</code> on error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB:read_header"></a><strong>ODB:read_header</strong> (id)</dt> +<dd> +object method. <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_read_header">git_odb_read_header</a>:<p><p>The header includes the length and the type of an object.<p> Note that most backends do not support reading only the header of an object, so the whole object will be read and then the header will be returned.<p> @return - 0 if the object was read; - GIT_ENOTFOUND if the object is not in the database. + + +<h3>Parameters</h3> +<ul> + + <li> + id: identity of the object to read.. Must be of type <a href="OID.html">OID</a>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><code>integer</code> or <code>nil</code> on error. + + <li><code>string</code> or <code>nil</code> on error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB:read_prefix"></a><strong>ODB:read_prefix</strong> (short_id, len)</dt> +<dd> +object method. <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_read_prefix">git_odb_read_prefix</a>:<p><p>This method queries all available ODB backends trying to match the 'len' first hexadecimal characters of the 'short_id'. The remaining (GIT_OID_HEXSZ-len)*4 bits of 'short_id' must be 0s. 'len' must be at least GIT_OID_MINPREFIXLEN, and the prefix must be long enough to identify a unique object in all the backends; the method will fail otherwise.<p> The returned object is reference counted and internally cached, so it should be closed by the user once it's no longer in use. + + +<h3>Parameters</h3> +<ul> + + <li> + short_id: a prefix of the id of the object to read.. Must be of type <a href="OID.html">OID</a>. + </li> + + <li> + len: the length of the prefix. Must be of type <code>integer</code>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><a href="OdbObject.html">OdbObject</a> or <code>nil</code> on error. + + <li>Error string. + +</ol> + + + +</dd> + + + + +<dt><a name="ODB:write"></a><strong>ODB:write</strong> (data, type)</dt> +<dd> +object method. <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/odb/git_odb_write">git_odb_write</a>:<p><p>This method writes a full object straight into the ODB. For most cases, it is preferred to write objects through a write stream, which is both faster and less memory intensive, specially for big objects.<p> This method is provided for compatibility with custom backends which are not able to support streaming writes + + +<h3>Parameters</h3> +<ul> + + <li> + data: buffer with the data to storr. Must be of type <code>string</code>. + </li> + + <li> + type: type of the data to store. Must be of type <code>string</code>. + </li> + +</ul> + + + + + + +<h3>Return values:</h3> +<ol> + + <li><a href="OID.html">OID</a> or <code>nil</code> on error. + + <li>Error string. + +</ol> + + + +</dd> + + +</dl> + + + + + + +</div> <!-- id="content" --> + +</div> <!-- id="main" --> + +<div id="about"> + <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> +</div> <!-- id="about" --> + +</div> <!-- id="container" --> +</body> +</html> |