다음을 통해 공유


ContentProvider.BulkInsert(Uri, ContentValues[]) Method

Definition

Override this to handle requests to insert a set of new rows, or the default implementation will iterate over the values and call #insert on each of them.

[Android.Runtime.Register("bulkInsert", "(Landroid/net/Uri;[Landroid/content/ContentValues;)I", "GetBulkInsert_Landroid_net_Uri_arrayLandroid_content_ContentValues_Handler")]
public virtual int BulkInsert (Android.Net.Uri uri, Android.Content.ContentValues[] values);
[<Android.Runtime.Register("bulkInsert", "(Landroid/net/Uri;[Landroid/content/ContentValues;)I", "GetBulkInsert_Landroid_net_Uri_arrayLandroid_content_ContentValues_Handler")>]
abstract member BulkInsert : Android.Net.Uri * Android.Content.ContentValues[] -> int
override this.BulkInsert : Android.Net.Uri * Android.Content.ContentValues[] -> int

Parameters

uri
Uri

The content:// URI of the insertion request.

values
ContentValues[]

An array of sets of column_name/value pairs to add to the database. This must not be null.

Returns

The number of values that were inserted.

Attributes

Remarks

Override this to handle requests to insert a set of new rows, or the default implementation will iterate over the values and call #insert on each of them. As a courtesy, call ContentResolver#notifyChange(android.net.Uri ,android.database.ContentObserver) notifyChange() after inserting. This method can be called from multiple threads, as described in Processes and Threads.

Java documentation for android.content.ContentProvider.bulkInsert(android.net.Uri, android.content.ContentValues[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to