FireDAC.Phys.MongoDBWrapper.TMongoExpression.Add

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function Add(const AKey: String; const AValue: String): TMongoExpression<T>; overload; inline;
function Add(const AKey: String; const AValue: Int32): TMongoExpression<T>; overload; inline;
function Add(const AKey: String; const AValue: Int64): TMongoExpression<T>; overload; inline;
function Add(const AKey: String; const AValue: Extended): TMongoExpression<T>; overload; inline;
function Add(const AKey: String; const AValue: Boolean): TMongoExpression<T>; overload; inline;
function Add(const AKey: String; const AValue: TDateTime): TMongoExpression<T>; overload; inline;
function Add(const AKey: String; const AValue: TBytes;  ABinaryType: TJsonBinaryType = TJsonBinaryType.Generic): TMongoExpression<T>; overload; inline;
function Add(const AKey: String; const AValue: TMongoOID): TMongoExpression<T>; overload; inline;
function Add(const AKey: String; const AValue: TJsonOid): TMongoExpression<T>; overload;
function Add(const AKey: string; const AValue: TJsonRegEx): TMongoExpression<T>; overload;
function Add(const AKey: string; const AValue: TJsonDBRef): TMongoExpression<T>; overload;
function Add(const AKey: string; const AValue: TJsonCodeWScope): TMongoExpression<T>; overload;
function Add(const AKey: String; const AValue: TVarRec): TMongoExpression<T>; overload; inline;
function Add(const AKey: String; const AValues: array of const): TMongoExpression<T>; overload;
function Add(const AKey: String; const AValue: Variant): TMongoExpression<T>; overload; inline;

C++

TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::UnicodeString AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const int AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const __int64 AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::Extended AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const bool AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::TDateTime AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::DynamicArray<System::Byte> AValue, System::Json::Types::TJsonBinaryType ABinaryType = (System::Json::Types::TJsonBinaryType)(0x0))/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, TMongoOID* const AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::Json::Types::TJsonOid &AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::Json::Types::TJsonRegEx &AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::Json::Types::TJsonDBRef &AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::Json::Types::TJsonCodeWScope &AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::TVarRec &AValue)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::TVarRec *AValues, const int AValues_High)/* overload */;
TMongoExpression__1<T>* __fastcall Add(const System::UnicodeString AKey, const System::Variant &AValue)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
FireDAC.Phys.MongoDBWrapper.pas
FireDAC.Phys.MongoDBWrapper.hpp
FireDAC.Phys.MongoDBWrapper TMongoExpression


説明

特定の型のフィールド/値ペアまたは配列要素を追加し、この式の参照を返します。

このメソッドを使用して、フィールド/値ペアまたは配列要素を MongoDB 式に新しく追加することができます。

このメソッドはオーバーロードされています。オーバーロード メソッドのうち適切なものを使用して、特定の型のフィールド/値ペアまたは配列要素を追加します。

メソッド ヘッダー 説明
 Add(const AKey: String; const AValue: String)

String 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: Int32)

Int32 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: Int64)

Int64 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: Extended)

Extended 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: Boolean)

Boolean 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: TDateTime)

TDateTime 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: TBytes;
      ABinaryType: TJsonBinaryType = TJsonBinaryType.Generic)

TBytes 型のフィールド/値ペアまたは配列要素を追加します。必要に応じて ABinaryType パラメータ(BSON バイナリ サブタイプに対応)を指定することができます。

Add(const AKey: String; const AValue: TMongoOID)

TMongoOID 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: TJsonOid)

TJsonOid 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: TJsonRegEx)

TJsonRegEx 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: TJsonDBRef)

TJsonDBRef 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: TJsonCodeWScope)

TJsonCodeWScope 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValue: TVarRec)

TVarRec 型のフィールド/値ペアまたは配列要素を追加します。

Add(const AKey: String; const AValues: array of const)

ネスト配列を追加します。このとき、配列要素には AValues オープン配列を使用します。

このオープン配列は "解析済み" の JSON を表します。項目を追加する方法は次のとおりです。

  • フィールド/値ペアを追加するには、キー名の後に値を指定します。
  • 配列要素を追加するには、値だけを指定します。
  • ネスト オブジェクトを追加するには、フィールド/値ペアを '{' と '}' で囲む必要があります。
  • ネスト配列を追加するには、要素を '[' と ']' で囲む必要があります。

次に例を示します。

    • Add('coords', [123.45, 80.90]) -> "coords": [123.45, 80.90]
    • Add('grades', ['{', 'grade', 'A', 'score', 11, '}', '{', 'grade', 'B', 'score', 17, '}']) -> "grades": [{"grade": "A", "score": 11}, {"grade": "B", "score": 17}]
Add(const AKey: String; const AValue: Variant)

バリアント データ型が表す型のフィールド/値ペアまたは配列要素を追加します。

メモ: 配列を追加する場合には、AKey の値は無視されます。読みやすくするために配列インデックスを指定してもかまいません。

関連項目