1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Options controlling the behaviour of a bulk-insert (`INSERT BULK`)
//! operation, mirroring the knobs exposed by `SqlBulkCopyOptions` in
//! ADO.NET's `SqlBulkCopy`.
use ;
/// A single bulk-copy option. Combine several with the `|` operator to build a
/// [`SqlBulkCopyOptions`] set, e.g.
/// `SqlBulkCopyOption::KeepIdentity | SqlBulkCopyOption::TableLock`.
///
/// See the MS docs for `SqlBulkCopyOptions`:
/// <https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlbulkcopyoptions>
/// A set of [`SqlBulkCopyOption`] flags controlling an `INSERT BULK`.
///
/// Build one by combining flags with `|`, or use [`SqlBulkCopyOptions::empty`]
/// (also the [`Default`]) for no options:
///
/// ```
/// # use tiberius::{SqlBulkCopyOption, SqlBulkCopyOptions};
/// let opts: SqlBulkCopyOptions =
/// SqlBulkCopyOption::KeepIdentity | SqlBulkCopyOption::TableLock;
/// assert!(opts.contains(SqlBulkCopyOption::KeepIdentity));
/// assert!(SqlBulkCopyOptions::empty().is_empty());
/// ```
pub type SqlBulkCopyOptions = ;
/// The sort order of a column, used as a bulk-insert `ORDER (...)` hint.
/// An order hint for a bulk insert: the column name and the [`SortOrder`] the
/// incoming rows are already sorted by. Passed as a slice, e.g.
/// `&[("id", SortOrder::Ascending)]`, these become the `ORDER (...)` clause of
/// the `INSERT BULK` statement.
pub type ColumnOrderHint<'a> = ;