Add(SQLite_DB,2905158,238,98)
{
FileName="elements\\delphi\\elements.db"
}
Add(SQLite_Query,15010514,280,224)
{
SQL="select info from groups where upper(info) like 'ИНТ%'"
link(onQuery,6189716:doAdd,[])
link(dbHandle,13868055:Var3,[(286,149)])
}
Add(Hub,8653263,161,161)
{
OutCount=4
link(onEvent1,2905158:doOpen,[(204,167)(204,104)])
link(onEvent2,11222037:addFunction,[])
link(onEvent3,15010514:doQuery,[(212,181)(212,230)])
link(onEvent4,2905158:doClose,[(222,188)(222,111)])
}
Add(InlineCode,11222037,238,168)
{
WorkPoints=#11:addFunction|
DataPoints=#8:dbHandle|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|52:uses kol,Share,Debug,Windows,SQLite3Api,hiSQLite_DB;|0:|4:type|28: THiAsmClass = class(TDebug)|9: public|22: dbHandle:THI_Event;|52: procedure addFunction(var _Data:TData; idx:word);|5: end;|0:|14:implementation|0:|65:procedure myFunc(ctx:pointer; nArg:integer; args:ppvalue); cdecl;|13:var s:string;|5:begin|31: s:=sqlite3_value_text(args^);|33: CharUpperBuff(@s[1],Length(s));|48: sqlite3_result_text(ctx,PChar(s),Length(s),0);|4:end;|0:|34:procedure THiAsmClass.addFunction;|13:var dt:TData;|5:begin|37: dt := ReadData(_Data,dbHandle,nil);|41: if _IsObject(dt,SQLite_GUID) then begin|90: sqlite3_create_function(ToObject(dt),PChar('UPPER'),1,SQLITE_ANY,nil,@myFunc,nil,nil);|6: end;|4:end;|0:|4:end.|
link(dbHandle,13868055:Var2,[])
}
Add(GetDataEx,13868055,231,140)
{
link(Data,2905158:dbHandle,[])
}
Add(Button,9962326,112,161)
{
Left=25
Top=35
link(onClick,8653263:doEvent1,[])
}
Add(ListBox,6189716,343,224)
{
Left=115
Top=15
Width=130
Height=95
}
Ввиду того, что путь к базе относительный, запускать в каталоге ...\HiAsm