関数、集計、およびユーザー定義型
system_schema functions、aggregates、およびtypesテーブルをクエリーして、ユーザー定義関数、ユーザー定義集計、およびユーザー定義型についての情報を入手します。
System_schema
functions
、aggregates
、およびtypes
テーブルをクエリーして、ユーザー定義関数(UDF)、ユーザ定義集計(UDA)、およびユーザー定義型(UDT)に関する情報を入手します。
手順
-
system.schema_functionsテーブルのユーザー定義関数をすべて表示します。
SELECT * FROM system_schema.functions;
以下に、cqlsh EXPAND ONオプションを使用する最初のレコードを示します。@ Row 1 ----------------------+-------------------------------------------------------------- keyspace_name | cycling function_name | avgfinal argument_types | ['frozen<tuple<int, bigint>>'] argument_names | ['state'] body | double r = 0;\n if (state.getInt(0) == 0) return null;\n r = state.getLong(1);\n r/= state.getInt(0);\n return Double.valueOf(r); called_on_null_input | True deterministic | False language | java monotonic | False monotonic_on | [] return_type | double ...
-
すべてのユーザー定義集計のスキーマ設定をリストします。
SELECT * FROM system_schema.aggregates;
@ Row 1 ----------------+---------------------------- keyspace_name | cycling aggregate_name | average argument_types | ['int'] deterministic | False final_func | avgfinal initcond | (0, 0) return_type | double state_func | avgstate state_type | frozen<tuple<int, bigint>> (1 rows)
-
すべてのユーザー定義型のスキーマ設定を示します。
SELECT * FROM system_schema.types;
@ Row 1 ---------------+------------------------------------------------ keyspace_name | cycling type_name | basic_info field_names | ['birthday', 'nationality', 'weight', 'height'] field_types | ['timestamp', 'text', 'text', 'text'] ...