title: Firebird UDF links author: Kazuhiro Yoshida mailto: moriq@moriq.com 1.1. Firebird UDF 作成のためのリンク集 これは Firebird UDF を作る際に参考になる(であろう)リンク集です。 Firebird UDF を作る上で InterBase UDF の資料も参考になります。 : hlubocky.del.cz/udf/ * %href:http://hlubocky.del.cz/udf/ Statistical UDF for InterBase and FireBird % Stat udf is library for Interbase or FireBird SQL database that alow to compute Median, StdDev, StdDev from selection, central and common moment, variance, variance from selection, skew, skew from selection, max, min, range, sum, count, ... . : bdn.borland.com/article/ * %href:http://bdn.borland.com/article/0,1410,25103,00.html Passing and Returning Dates to a Delphi-created UDF % * %href:http://bdn.borland.com/article/0,1410,25785,00.html Example blob UDFs % * %href:http://bdn.borland.com/article/0,1410,25786,00.html Declaring a blob UDF % * %href:http://bdn.borland.com/article/0,1410,25489,00.html Can UDF's Add Results From More Than One Record? % The UDF can not remember the previous answer. * %href:http://bdn.borland.com/article/0,1410,25464,00.html Is it possible to access data from the database within a UDF? % Although it is possible to access data from a UDF, it is not recommended. * %href:http://bdn.borland.com/article/0,1410,25593,00.html Returning thread-safe values from an UDF % : www.ibphoenix.com/ [IBPhoenix Research] * %href:http://www.ibphoenix.com/a476.htm?a=ibphoenix&page=ibp_howto2 Writing UDF's For InterBase % By Greg Deatz, Borland Developer's Conference 2000. * %href:http://www.ibphoenix.com/a476.htm?a=ibphoenix&page=ibp_howto5 Writing Clean and Safe UDFs In Delphi % By Greg Deatz, Borland Developer's Conference 1998. * %href:http://www.borland.co.jp/interbase/tech/ib_udf/index.html DelphiによるUDFの作成 % [www.borland.co.jp] 日本語訳 * %href:http://www.ibphoenix.com/a476.htm?a=ibphoenix&page=ibp_howto7 Creating UDF's in Delphi % By Brett Bandy and Wayne Shaddock. : www.firebirdsql.org/ * %href:http://www.firebirdsql.org/index.php?op=useful&id=geldenhuis Writing UDF's in Delphi for Interbase/Firebird % * %href:http://www.firebirdsql.org/index.php?op=useful&id=deatz_udf Writing UDFs for InterBase % : www.cvalde.net/ * %href:http://www.cvalde.net/document/using_descriptors_with_udfs.htm Using descriptors with UDFs. % : firebird.sourceforge.net/ * %href:http://firebird.sourceforge.net/index.php?op=files Firebird RDBMS Downloads % %href:http://sourceforge.net/projects/firebird download (Source) % [重要] firebird2/src/extlib * %href:http://firebird.sourceforge.net/index.php?op=doc&id=userdoc User Documentation % %href:http://www.ibphoenix.com/downloads/60All.zip InterBase 6.0 manuals % Beta docs (full set, cross-indexed) [重要] 一通りまとまった(網羅されている)マニュアルです。読むべし。 : www.ibsurgeon.com/ * %href:http://www.ibsurgeon.com/links.html InterBase/Firebird related downloads % [重要] ibase.pas, ib_external.pas は FreeUDFLib に含まれています。 : www.volny.cz/iprenosil/interbase/ * %href:http://www.volny.cz/iprenosil/interbase/ip_ib_strings.htm InterBase - Comparing BLOB, CHAR and VARCHAR % To BLOB or not to BLOB, that is the question: Whether to store string in BLOB, or CHAR, or VARCHAR ? * %href:http://www.geocities.jp/kimura804/rdb/InterBase/ip_ib_strings_j.htm BLOBにする、しない、それが問題だ: 文字列をBLOBまたはCHARあるいは VARCHARに格納するかどうか。% [kimura804] 日本語訳 * %href:http://www.volny.cz/iprenosil/interbase/ip_ib_code_string.htm InterBase - String functions % String functions in SP/trigger language * %href:http://www.geocities.jp/kimura804/rdb/InterBase/ip_ib_code_string_j.htm ストアドプロシジャとトリガー言語内の文字列関数% [kimura804] 日本語訳 --html
All these functions can easily be implemented by UDF, however in some situations you can't/don't want to use UDF. Among reasons to avoid UDFs are e.g.
-- * %href:http://www.volny.cz/iprenosil/interbase/ip_ib_udf_null.htm UDF and NULL parameters% PBlob PParamDsc の使い方 (Delphi source 付き) * %href:http://www.geocities.jp/kimura804/rdb/InterBase/ip_ib_udf_null_j.htm UDFとNULLパラメタ% [kimura804] 日本語訳(一部) : Firebird-jp * %href:http://groups.yahoo.co.jp/group/Firebird-jp-general/messages/315?expand=1 Yahoo!グループ : Firebird-jp-general メッセージ : 881件中 315-329件目を表示 % * %href:http://groups.yahoo.co.jp/group/Firebird-jp-general/message/322?expand=1 Firebird-jp-general:322 % --text Helen Borrieさんに教えてもらいました。 まず、 ib_udf と fbudf では、パラメータの受け渡し方法が違います。 ib_udf はCデータタイプで、fbudf はparamdscとなっています。external function定義もそうですし、ソースコードでも確認しました。 その場合、paramdsc → Cデータタイプは OK ですが、Cデータタイプ →  paramdsc はアウトです。 したがって、 ROUND(ABS(-1.4)) は NULL ですが ABS(ROUND(-1.4)) は 1 になります。 これは、引っかかりやすいことだそうなので、注意が必要だとのことです。ま た、一般に十分理解されているとはいえないとのことでした。 そして、ROUND()については、やはりCAST()を使って丸めたほうが無難だとい う意見でした。 -- 1.1. UDF と関係なくても役立つリンク集 UDF と関係なくても Firebird を Delphi で扱う際には役立つ(であろう)ページへのリンク * %href:http://firebird.sourceforge.net/index.php?op=doc&id=techinfo Technical Articles % %href:http://firebird.sourceforge.net/downloads/firebird_zebedee_eng.pdf Using ZeBeDee with Firebird to Encrypt and Compress Network Traffic % * %href:http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_sqlroles SQL Roles: Users and Security in InterBase % [IBPhoenix Development] By Markus Kemper and Brett Bandy, Borland Developers Conference 1998. これを出展とするページ(日本語): : www.borland.co.jp/interbase/tech/ * %href:http://www.borland.co.jp/interbase/tech/ib_role/ InterBase Technical Information % SQLロール:InterBaseでのユーザとセキュリティ isc の使い方 (C/Delphi source 付き) * %href:http://www.borland.co.jp/interbase/tech/ib_role/ibrole_3.html InterBase SQL Role (3) % * %href:http://www.borland.co.jp/interbase/tech/ib_role/ibrole_3b.html Delphiで新規ユーザを追加する % * %href:http://www.borland.co.jp/interbase/tech/ib_role/ibrole_3d.html Delphiでユーザを修正する % * %href:http://www.borland.co.jp/interbase/tech/ib_role/ibrole_3f.html Delphiでユーザを削除する % なぜか (3) はインデックスからリンクされていないので載せてみた。 * %href:http://homepages.borland.com/dthorpe/blog/delphi/ Delphi Compiler Core % Random notes on Borland's Delphi language and tools. Hosted by Danny Thorpe, Delphi Compiler Architect. * %href:http://delphi.weblogs.com/ Delphi / InterBase Weblog % News of interest to Delphi and InterBase developers * %href:http://www.ibexpert.com/ IBExpert % %href:http://www.hksoftware.net/download/ IBExpert download % 日本語化できます。