sqlite3源码,适合作为嵌入式(embedded)

源代码在线查看: last_insert_rowid.html

软件大小: 2020 K
上传用户: wait2010
关键词: embedded sqlite3 源码 嵌入式
下载地址: 免注册下载 普通下载 VIP

相关代码

												Last Insert Rowid								body {				    margin: auto;				    font-family: "Verdana" "sans-serif";				    padding: 8px 1%;				}								a { color: #45735f }				a:visited { color: #734559 }								.logo { position:absolute; margin:3px; }				.tagline {				  float:right;				  text-align:right;				  font-style:italic;				  width:240px;				  margin:12px;				  margin-top:58px;				}								.toolbar {				  font-variant: small-caps;				  text-align: center;				  line-height: 1.6em;				  margin: 0;				  padding:1px 8px;				}				.toolbar a { color: white; text-decoration: none; padding: 6px 12px; }				.toolbar a:visited { color: white; }				.toolbar a:hover { color: #80a796; background: white; }								.content    { margin: 5%; }				.content dt { font-weight:bold; }				.content dd { margin-bottom: 25px; margin-left:20%; }				.content ul { padding:0px; padding-left: 15px; margin:0px; }								/* rounded corners */				.se  { background: url(../images/se.png) 100% 100% no-repeat #80a796}				.sw  { background: url(../images/sw.png) 0% 100% no-repeat }				.ne  { background: url(../images/ne.png) 100% 0% no-repeat }				.nw  { background: url(../images/nw.png) 0% 0% no-repeat }																  																												 border="0">								Small. Fast. Reliable.Choose any three.												  				  				    About				    Sitemap				    Documentation				    Download				    License				    News				    Developers				    Support				  								  				SQLite C InterfaceLast Insert Rowidsqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);								Each entry in an SQLite table has a unique 64-bit signed				integer key called the "rowid". The rowid is always available				as an undeclared column named ROWID, OID, or _ROWID_ as long as those				names are not also used by explicitly declared columns. If				the table has a column of type INTEGER PRIMARY KEY then that column				is another alias for the rowid.								This routine returns the rowid of the most recent				successful INSERT into the database from the database connection				in the first argument.  If no successful INSERTs				have ever occurred on that database connection, zero is returned.								If an INSERT occurs within a trigger, then the rowid of the inserted				row is returned by this routine as long as the trigger is running.				But once the trigger terminates, the value returned by this routine				reverts to the last value inserted before the trigger fired.								An INSERT that fails due to a constraint violation is not a				successful INSERT and does not change the value returned by this				routine.  Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,				and INSERT OR ABORT make no changes to the return value of this				routine when their insertion fails.  When INSERT OR REPLACE				encounters a constraint violation, it does not fail.  The				INSERT continues to completion after deleting rows that caused				the constraint problem so INSERT OR REPLACE will always change				the return value of this interface.								For the purposes of this routine, an INSERT is considered to				be successful even if it is subsequently rolled back.								Invariants:								H12221 								The sqlite3_last_insert_rowid() function shall return				the rowid				of the most recent successful INSERT performed on the same				database connection and within the same or higher level				trigger context, or zero if there have been no qualifying				INSERT statements.				H12223 								The sqlite3_last_insert_rowid() function shall return the				same value when called from the same trigger context				immediately before and after a ROLLBACK.												Assumptions:								A12232 								If a separate thread performs a new INSERT on the same				database connection while the sqlite3_last_insert_rowid()				function is running and thus changes the last insert rowid,				then the value returned by sqlite3_last_insert_rowid() is				unpredictable and might not equal either the old or the new				last insert rowid.								See also lists of				  Objects,				  Constants, and				  Functions.				This page last modified 2008/12/09 18:44:04 UTC											

相关资源