diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 21:04:32 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 21:04:32 +0000 |
commit | b5ddc6c8de90632ac8cbd9c2c1d3eb30534d66cb (patch) | |
tree | 4f4d56b2176078ef7dcc3b37cedb5c08f70b92fc /unicode/src/lib | |
parent | 3c999bea6a60e6b58dc8e9a70c08898c4efea906 (diff) | |
download | usdx-b5ddc6c8de90632ac8cbd9c2c1d3eb30534d66cb.tar.gz usdx-b5ddc6c8de90632ac8cbd9c2c1d3eb30534d66cb.tar.xz usdx-b5ddc6c8de90632ac8cbd9c2c1d3eb30534d66cb.zip |
update to current trunk (1853)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1913 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | unicode/src/lib/SQLite/SQLiteTable3.pas | 21 | ||||
-rw-r--r-- | unicode/src/lib/portaudio/portaudio.pas | 4 |
2 files changed, 23 insertions, 2 deletions
diff --git a/unicode/src/lib/SQLite/SQLiteTable3.pas b/unicode/src/lib/SQLite/SQLiteTable3.pas index 7df76363..3aed54a4 100644 --- a/unicode/src/lib/SQLite/SQLiteTable3.pas +++ b/unicode/src/lib/SQLite/SQLiteTable3.pas @@ -139,6 +139,7 @@ type procedure Commit; procedure Rollback; function TableExists(TableName: string): boolean; + function ContainsColumn(Table: String; Column: String) : boolean; function GetLastInsertRowID: int64; function GetLastChangedRows: int64; procedure SetTimeout(Value: integer); @@ -759,6 +760,26 @@ begin end; end; +function TSQLiteDatabase.ContainsColumn(Table: String; Column: String) : boolean; +var + sql: string; + ds: TSqliteTable; + i : integer; +begin + sql := 'PRAGMA TABLE_INFO('+Table+');'; + ds := self.GetTable(sql); + try + Result := false; + while (ds.Next() and not Result and not ds.EOF) do + begin + if ds.FieldAsString(1) = Column then + Result := true; + end; + finally + ds.Free; + end; +end; + procedure TSQLiteDatabase.SetTimeout(Value: integer); begin SQLite3_BusyTimeout(self.fDB, Value); diff --git a/unicode/src/lib/portaudio/portaudio.pas b/unicode/src/lib/portaudio/portaudio.pas index a0286b48..ea7d06b7 100644 --- a/unicode/src/lib/portaudio/portaudio.pas +++ b/unicode/src/lib/portaudio/portaudio.pas @@ -109,8 +109,8 @@ type TPaErrorCode = {enum}cint; const paStreamIsNotStopped = (paNotInitialized+18); paInputOverflowed = (paNotInitialized+19); paOutputUnderflowed = (paNotInitialized+20); - paHostApiNotFound = (paNotInitialized+21); - paInvalidHostApi = (paNotInitialized+22); + paHostApiNotFound = (paNotInitialized+21); // The notes below are from the + paInvalidHostApi = (paNotInitialized+22); // original file portaudio.h paCanNotReadFromACallbackStream = (paNotInitialized+23); {**< @todo review error code name *} paCanNotWriteToACallbackStream = (paNotInitialized+24); {**< @todo review error code name *} paCanNotReadFromAnOutputOnlyStream = (paNotInitialized+25); {**< @todo review error code name *} |