diff --git a/core/async.html b/core/async.html index 8f6ed30d..8ce17265 100644 --- a/core/async.html +++ b/core/async.html @@ -412,35 +412,35 @@

W
val id: Guid
Multiple items
[<Struct>] type Guid = - new: b: byte array -> unit + 5 overloads + new: b: byte array -> unit + 6 overloads member CompareTo: value: Guid -> int + 1 overload member Equals: g: Guid -> bool + 1 overload member GetHashCode: unit -> int - member ToByteArray: unit -> byte array + member ToByteArray: unit -> byte array + 1 overload member ToString: unit -> string + 2 overloads - member TryFormat: destination: Span<char> * charsWritten: byref<int> * ?format: ReadOnlySpan<char> -> bool - member TryWriteBytes: destination: Span<byte> -> bool - static member (<>) : a: Guid * b: Guid -> bool - static member (=) : a: Guid * b: Guid -> bool - ...
<summary>Represents a globally unique identifier (GUID).</summary>

--------------------
Guid ()
Guid(b: byte array) : Guid
Guid(b: ReadOnlySpan<byte>) : Guid
Guid(g: string) : Guid
Guid(a: int, b: int16, c: int16, d: byte array) : Guid
Guid(a: int, b: int16, c: int16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : Guid
Guid(a: uint32, b: uint16, c: uint16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : Guid
+ member TryFormat: destination: Span<char> * charsWritten: byref<int> * ?format: ReadOnlySpan<char> -> bool + 1 overload + member TryWriteBytes: destination: Span<byte> -> bool + 1 overload + static member (<) : left: Guid * right: Guid -> bool + static member (<=) : left: Guid * right: Guid -> bool + ...
<summary>Represents a globally unique identifier (GUID).</summary>

--------------------
Guid ()
Guid(b: byte array) : Guid
Guid(b: ReadOnlySpan<byte>) : Guid
Guid(g: string) : Guid
Guid(b: ReadOnlySpan<byte>, bigEndian: bool) : Guid
Guid(a: int, b: int16, c: int16, d: byte array) : Guid
Guid(a: int, b: int16, c: int16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : Guid
Guid(a: uint32, b: uint16, c: uint16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : Guid
Multiple items
type Task = interface IAsyncResult interface IDisposable new: action: Action -> unit + 7 overloads - member ConfigureAwait: continueOnCapturedContext: bool -> ConfiguredTaskAwaitable + member ConfigureAwait: continueOnCapturedContext: bool -> ConfiguredTaskAwaitable + 1 overload member ContinueWith: continuationAction: Action<Task,obj> * state: obj -> Task + 19 overloads member Dispose: unit -> unit member GetAwaiter: unit -> TaskAwaiter member RunSynchronously: unit -> unit + 1 overload member Start: unit -> unit + 1 overload - member Wait: unit -> unit + 4 overloads + member Wait: unit -> unit + 5 overloads ...
<summary>Represents an asynchronous operation.</summary>

--------------------
type Task<'TResult> = inherit Task new: ``function`` : Func<obj,'TResult> * state: obj -> unit + 7 overloads - member ConfigureAwait: continueOnCapturedContext: bool -> ConfiguredTaskAwaitable<'TResult> + member ConfigureAwait: continueOnCapturedContext: bool -> ConfiguredTaskAwaitable<'TResult> + 1 overload member ContinueWith: continuationAction: Action<Task<'TResult>,obj> * state: obj -> Task + 19 overloads member GetAwaiter: unit -> TaskAwaiter<'TResult> - member WaitAsync: timeout: TimeSpan -> Task<'TResult> + 2 overloads + member WaitAsync: cancellationToken: CancellationToken -> Task<'TResult> + 4 overloads member Result: 'TResult static member Factory: TaskFactory<'TResult>
<summary>Represents an asynchronous operation that can return a value.</summary>
<typeparam name="TResult">The type of the result produced by this <see cref="T:System.Threading.Tasks.Task`1" />.</typeparam>


--------------------
Task(action: Action) : Task
Task(action: Action, cancellationToken: Threading.CancellationToken) : Task
Task(action: Action, creationOptions: TaskCreationOptions) : Task
Task(action: Action<obj>, state: obj) : Task
Task(action: Action, cancellationToken: Threading.CancellationToken, creationOptions: TaskCreationOptions) : Task
Task(action: Action<obj>, state: obj, cancellationToken: Threading.CancellationToken) : Task
Task(action: Action<obj>, state: obj, creationOptions: TaskCreationOptions) : Task
Task(action: Action<obj>, state: obj, cancellationToken: Threading.CancellationToken, creationOptions: TaskCreationOptions) : Task

--------------------
Task(``function`` : Func<'TResult>) : Task<'TResult>
Task(``function`` : Func<obj,'TResult>, state: obj) : Task<'TResult>
Task(``function`` : Func<'TResult>, cancellationToken: Threading.CancellationToken) : Task<'TResult>
Task(``function`` : Func<'TResult>, creationOptions: TaskCreationOptions) : Task<'TResult>
Task(``function`` : Func<obj,'TResult>, state: obj, cancellationToken: Threading.CancellationToken) : Task<'TResult>
Task(``function`` : Func<obj,'TResult>, state: obj, creationOptions: TaskCreationOptions) : Task<'TResult>
Task(``function`` : Func<'TResult>, cancellationToken: Threading.CancellationToken, creationOptions: TaskCreationOptions) : Task<'TResult>
Task(``function`` : Func<obj,'TResult>, state: obj, cancellationToken: Threading.CancellationToken, creationOptions: TaskCreationOptions) : Task<'TResult>
val async: AsyncBuilder
@@ -483,17 +483,17 @@

W
val entity: obj
Multiple items
[<Struct>] type DateTime = - new: year: int * month: int * day: int -> unit + 10 overloads + new: year: int * month: int * day: int -> unit + 16 overloads member Add: value: TimeSpan -> DateTime member AddDays: value: float -> DateTime member AddHours: value: float -> DateTime + member AddMicroseconds: value: float -> DateTime member AddMilliseconds: value: float -> DateTime member AddMinutes: value: float -> DateTime member AddMonths: months: int -> DateTime member AddSeconds: value: float -> DateTime member AddTicks: value: int64 -> DateTime - member AddYears: value: int -> DateTime - ...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
+ ...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
property DateTime.UtcNow: DateTime with get
<summary>Gets a <see cref="T:System.DateTime" /> object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).</summary>
<returns>An object whose value is the current UTC date and time.</returns>
val box: value: 'T -> obj
SqlDataProvider<...>.dataContext.SubmitUpdatesAsync() : Task
<summary>Save changes to data-source. May throws errors: Use Async.Catch and to deal with non-saved items use GetUpdates() and ClearUpdates().</summary>
diff --git a/core/crud.html b/core/crud.html index de5ed299..03fb5310 100644 --- a/core/crud.html +++ b/core/crud.html @@ -535,17 +535,17 @@

val now: DateTime
Multiple items
[<Struct>] type DateTime = - new: year: int * month: int * day: int -> unit + 10 overloads + new: year: int * month: int * day: int -> unit + 16 overloads member Add: value: TimeSpan -> DateTime member AddDays: value: float -> DateTime member AddHours: value: float -> DateTime + member AddMicroseconds: value: float -> DateTime member AddMilliseconds: value: float -> DateTime member AddMinutes: value: float -> DateTime member AddMonths: months: int -> DateTime member AddSeconds: value: float -> DateTime member AddTicks: value: int64 -> DateTime - member AddYears: value: int -> DateTime - ...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
+ ...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
property DateTime.Now: DateTime with get
<summary>Gets a <see cref="T:System.DateTime" /> object that is set to the current date and time on this computer, expressed as the local time.</summary>
<returns>An object whose value is the current local date and time.</returns>
val row: SqlDataProvider<...>.dataContext.main.OrdersEntity
val box: value: 'T -> obj
val bdate: DateTime
-
DateTime.Parse(s: string) : DateTime
DateTime.Parse(s: string, provider: IFormatProvider) : DateTime
DateTime.Parse(s: string, provider: IFormatProvider, styles: Globalization.DateTimeStyles) : DateTime
DateTime.Parse(s: ReadOnlySpan<char>, ?provider: IFormatProvider, ?styles: Globalization.DateTimeStyles) : DateTime
+
DateTime.Parse(s: string) : DateTime
DateTime.Parse(s: string, provider: IFormatProvider) : DateTime
DateTime.Parse(s: ReadOnlySpan<char>, provider: IFormatProvider) : DateTime
DateTime.Parse(s: string, provider: IFormatProvider, styles: Globalization.DateTimeStyles) : DateTime
DateTime.Parse(s: ReadOnlySpan<char>, ?provider: IFormatProvider, ?styles: Globalization.DateTimeStyles) : DateTime
DateTime.AddYears(value: int) : DateTime
property DateTime.UtcNow: DateTime with get
<summary>Gets a <see cref="T:System.DateTime" /> object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).</summary>
<returns>An object whose value is the current UTC date and time.</returns>
val failwith: message: string -> 'T
diff --git a/core/general.html b/core/general.html index 7f122bf8..ba37db65 100644 --- a/core/general.html +++ b/core/general.html @@ -389,7 +389,7 @@

Basic Queryin

Individuals

The SQL provider has the ability via intellisense to navigate the actual data held within a table or view. You can then bind that data as an entity to a value.

-
let BERGS = ctx.Main.Customers.Individuals.BERGS
+
let BERGS = ctx.Main.Customers.Individuals.BERGS
 

Every table and view has an Individuals property. When you press dot on this property, intellisense will display a list of the data in that table, @@ -402,7 +402,7 @@

Individuals

-
let christina = ctx.Main.Customers.Individuals.``As ContactName``.``BERGS, Christina Berglund``
+
let christina = ctx.Main.Customers.Individuals.``As ContactName``.``BERGS, Christina Berglund``
 

DataContext

You should create and use one data context as long as it has the parameters you need. @@ -423,7 +423,7 @@

DataContext

A. Once SQLProvider gets a "mental model" of your database (the schema), that is what is used for any intellisense/completion suggestions for the rest of your IDE session.

This is a fantastic feature, because it means that you're not assaulting your database with a 
-new "What are you like?" query on EVERY SINGLE KEYSTROKE. 
+new "What are you like?" query on EVERY SINGLE KEYSTROKE. 
 
 But what if the database changes? SQLProvider will NOT see your change because it's source of truth is
 that locally cached schema snapshot it took right when it started, and that snapshot will persist until
@@ -436,7 +436,7 @@ 

DataContext

2. Forced clearing of the local database schema cache. If SQLProvider is currently able to communicate with the database, you can force the local cache to clear, to be invalidated and refreshed by - by using what are called `Design Time Commands`, specifically the + by using what are called `Design Time Commands`, specifically the `ClearDatabaseSchemaCache` method. You're probably thinking: "Ok, fine, that sounds good! How do I do that though?" @@ -640,11 +640,10 @@

val ordersQuery: (string * System.DateTime * string) array
property SqlDataProvider<...>.dataContext.main.OrdersEntity.OrderDate: System.DateTime with get, set
<summary>OrderDate: datetime</summary>
property SqlDataProvider<...>.dataContext.main.OrdersEntity.ShipAddress: string with get, set
<summary>ShipAddress: nvarchar(60)</summary>
-
val BERGS: SqlDataProvider<...>.dataContext.main.CustomersEntity
+
val BERGS: obj
property SqlDataProvider<...>.dataContext.mainSchema.main.Customers.Individuals: SqlDataProvider<...>.dataContext.main.Customers.Individuals with get
<summary>Get individual items from the table. Requires single primary key.</summary>
-
property SqlDataProvider<...>.dataContext.main.Customers.Individuals.BERGS: SqlDataProvider<...>.dataContext.main.CustomersEntity with get
-
val christina: SqlDataProvider<...>.dataContext.main.CustomersEntity
-
val using: resource: 'T -> action: ('T -> 'U) -> 'U (requires 'T :> System.IDisposable)
+
val christina: obj
+
val using: resource: 'T -> action: ('T -> 'U) -> 'U (requires 'T :> System.IDisposable)
diff --git a/core/individuals.html b/core/individuals.html index 50454bf8..2fb57678 100644 --- a/core/individuals.html +++ b/core/individuals.html @@ -266,13 +266,13 @@

Individuals

let customers = ctx.Main.Customers

Get individual customer row by primary key value

-
customers.Individuals.COMMI
+
customers.Individuals.COMMI
 

Get individual customer row using address

-
customers.Individuals.``As ContactName``.``COMMI, Pedro Afonso``
+
customers.Individuals.``As ContactName``.``COMMI, Pedro Afonso``
 

Get individual customer row using address

-
customers.Individuals.``As Address``.``CONSH, Berkeley Gardens 12  Brewery``
+
customers.Individuals.``As Address``.``CONSH, Berkeley Gardens 12  Brewery``
 
Multiple items
type LiteralAttribute = @@ -336,7 +336,6 @@

Individuals

property SqlDataProvider<...>.dataContext.Main: SqlDataProvider<...>.dataContext.mainSchema with get
property SqlDataProvider<...>.dataContext.mainSchema.Customers: SqlDataProvider<...>.dataContext.mainSchema.main.Customers with get
<summary> The table Customers belonging to schema main</summary>
property SqlDataProvider<...>.dataContext.mainSchema.main.Customers.Individuals: SqlDataProvider<...>.dataContext.main.Customers.Individuals with get
<summary>Get individual items from the table. Requires single primary key.</summary>
-
property SqlDataProvider<...>.dataContext.main.Customers.Individuals.COMMI: SqlDataProvider<...>.dataContext.main.CustomersEntity with get
diff --git a/core/mappers.html b/core/mappers.html index 6d191a52..e7c9aed4 100644 --- a/core/mappers.html +++ b/core/mappers.html @@ -370,17 +370,17 @@

Multiple items
val string: value: 'T -> string

--------------------
type string = String
Multiple items
[<Struct>] type DateTime = - new: year: int * month: int * day: int -> unit + 10 overloads + new: year: int * month: int * day: int -> unit + 16 overloads member Add: value: TimeSpan -> DateTime member AddDays: value: float -> DateTime member AddHours: value: float -> DateTime + member AddMicroseconds: value: float -> DateTime member AddMilliseconds: value: float -> DateTime member AddMinutes: value: float -> DateTime member AddMonths: months: int -> DateTime member AddSeconds: value: float -> DateTime member AddTicks: value: int64 -> DateTime - member AddYears: value: int -> DateTime - ...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
+ ...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
val mapEmployee: dbRecord: SqlDataProvider<...>.dataContext.main.EmployeesEntity -> Employee
val dbRecord: SqlDataProvider<...>.dataContext.main.EmployeesEntity
Multiple items
[<Struct>] type Guid = - new: b: byte array -> unit + 5 overloads + new: b: byte array -> unit + 6 overloads member CompareTo: value: Guid -> int + 1 overload member Equals: g: Guid -> bool + 1 overload member GetHashCode: unit -> int - member ToByteArray: unit -> byte array + member ToByteArray: unit -> byte array + 1 overload member ToString: unit -> string + 2 overloads - member TryFormat: destination: Span<char> * charsWritten: byref<int> * ?format: ReadOnlySpan<char> -> bool - member TryWriteBytes: destination: Span<byte> -> bool - static member (<>) : a: Guid * b: Guid -> bool - static member (=) : a: Guid * b: Guid -> bool - ...
<summary>Represents a globally unique identifier (GUID).</summary>

--------------------
Guid ()
Guid(b: byte array) : Guid
Guid(b: ReadOnlySpan<byte>) : Guid
Guid(g: string) : Guid
Guid(a: int, b: int16, c: int16, d: byte array) : Guid
Guid(a: int, b: int16, c: int16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : Guid
Guid(a: uint32, b: uint16, c: uint16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : Guid
+ member TryFormat: destination: Span<char> * charsWritten: byref<int> * ?format: ReadOnlySpan<char> -> bool + 1 overload + member TryWriteBytes: destination: Span<byte> -> bool + 1 overload + static member (<) : left: Guid * right: Guid -> bool + static member (<=) : left: Guid * right: Guid -> bool + ...
<summary>Represents a globally unique identifier (GUID).</summary>

--------------------
Guid ()
Guid(b: byte array) : Guid
Guid(b: ReadOnlySpan<byte>) : Guid
Guid(g: string) : Guid
Guid(b: ReadOnlySpan<byte>, bigEndian: bool) : Guid
Guid(a: int, b: int16, c: int16, d: byte array) : Guid
Guid(a: int, b: int16, c: int16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : Guid
Guid(a: uint32, b: uint16, c: uint16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : Guid
Guid.NewGuid() : Guid
val myGuidAsString: string
Guid.ToString() : string
Guid.ToString(format: string) : string
Guid.ToString(format: string, provider: IFormatProvider) : string
Multiple items
[<Struct>] type DateTime = - new: year: int * month: int * day: int -> unit + 10 overloads + new: year: int * month: int * day: int -> unit + 16 overloads member Add: value: TimeSpan -> DateTime member AddDays: value: float -> DateTime member AddHours: value: float -> DateTime + member AddMicroseconds: value: float -> DateTime member AddMilliseconds: value: float -> DateTime member AddMinutes: value: float -> DateTime member AddMonths: months: int -> DateTime member AddSeconds: value: float -> DateTime member AddTicks: value: int64 -> DateTime - member AddYears: value: int -> DateTime - ...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
+ ...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
property DateTime.UtcNow: DateTime with get
<summary>Gets a <see cref="T:System.DateTime" /> object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).</summary>
<returns>An object whose value is the current UTC date and time.</returns>
DateTime.ToString() : string
DateTime.ToString(format: string) : string
DateTime.ToString(provider: IFormatProvider) : string
DateTime.ToString(format: string, provider: IFormatProvider) : string
val box: value: 'T -> obj
diff --git a/core/odbc.html b/core/odbc.html index 6fd4150f..065a5e67 100644 --- a/core/odbc.html +++ b/core/odbc.html @@ -384,6 +384,7 @@

DTC Trans Timeout: TimeSpan IsolationLevel: IsolationLevel } + member Equals: TransactionOptions * IEqualityComparer -> bool static member Default: TransactionOptions
<summary> Corresponds to the System.Transactions.TransactionOptions. </summary> diff --git a/core/querying.html b/core/querying.html index b64ac04f..edd6ecec 100644 --- a/core/querying.html +++ b/core/querying.html @@ -1349,7 +1349,7 @@

Expressions

These operators perform no specific function in the code itself, rather they are placeholders replaced by their database-specific server-side operations. Their utility is in forcing the compiler to check against the correct types.

-
let bergs = ctx.Main.Customers.Individuals.BERGS
+
let bergs = ctx.Main.Customers.Individuals.BERGS
 

Operators

You can find some custom operators using FSharp.Data.Sql:

@@ -1367,38 +1367,38 @@

let result = - query { + query { for order in ctx.Main.Orders do where ( order.ShippedDate.IsSome && order.ShippedDate.Value.Year = 2015) select (order.OrderId, order.Freight) - } |> Array.executeQueryAsync + } |> Array.executeQueryAsync

Using booleans and simple variables (from outside a scope) in where-clauses

This is how you make your code easier to read when you have multiple code paths. SQLProvider will optimize the SQL-clause before sending it to the database, so it will still be simple.

Consider how clean is this source-code compared to other with similar logic:

-
open System.Linq
-let getOrders(futureOrders:bool, shipYears:int list) =
+
open System.Linq
+let getOrders(futureOrders:bool, shipYears:int list) =
 
-    let today = DateTime.UtcNow.Date
-    let pastOrders = not futureOrders
-    let noYearFilter = shipYears.IsEmpty
+    let today = DateTime.UtcNow.Date
+    let pastOrders = not futureOrders
+    let noYearFilter = shipYears.IsEmpty
 
-    let result =
-        query {
-            for order in ctx.Main.Orders do
-            where ( 
-                (noYearFilter || shipYears.Contains(order.ShippedDate.Year))
+    let result =
+        query {
+            for order in ctx.Main.Orders do
+            where ( 
+                (noYearFilter || shipYears.Contains(order.ShippedDate.Year))
                 &&
-                ((futureOrders && order.OrderDate > today) ||
-                 (pastOrders   && order.OrderDate <= today))
+                ((futureOrders && order.OrderDate > today) ||
+                 (pastOrders   && order.OrderDate <= today))
             ) 
-            select (order.OrderId, order.Freight)
-        } |> Array.executeQueryAsync
-    result
+            select (order.OrderId, order.Freight)
+        } |> Array.executeQueryAsync
+    result
 
Technical details @@ -1415,52 +1415,52 @@

// ContactName, ContactTitle, Country, // CustomerID, Fax, Phone, PostalCode, // Region FROM main.Customers -let selectFullObject = - query { - for customer in ctx.Main.Customers do - select customer - } |> Seq.tryHeadAsync +let selectFullObject = + query { + for customer in ctx.Main.Customers do + select customer + } |> Seq.tryHeadAsync // Select only two fields, basically: // SELECT TOP 1 Address, City FROM main.Customers -let selectSmallObject = - query { - for customer in ctx.Main.Customers do - select (customer.Address, customer.City) - } |> Seq.tryHeadAsync +let selectSmallObject = + query { + for customer in ctx.Main.Customers do + select (customer.Address, customer.City) + } |> Seq.tryHeadAsync

If you still want the whole objects and return those to a client as untyped records, you can use ColumnValues |> Map.ofSeq:

-
let someQuery =
-    query {
-        for customer in ctx.Main.Customers do
+
let someQuery =
+    query {
+        for customer in ctx.Main.Customers do
         //where(...)
-        select customer
-    } |> Seq.toArray
+        select customer
+    } |> Seq.toArray
 
-someQuery |> Array.map(fun c -> c.ColumnValues |> Map.ofSeq)
+someQuery |> Array.map(fun c -> c.ColumnValues |> Map.ofSeq)
 

F# Map values are accessed like this: myItem.["City"]

Using code logic in select-clause

Don't be scared to insert non-Sql syntax to select-clauses. They will be parsed business-logic side!

-
let fetchOrders customerZone =
-    let currentDate = DateTime.UtcNow.Date
-    query {
-        for order in ctx.Main.Orders do
+
let fetchOrders customerZone =
+    let currentDate = DateTime.UtcNow.Date
+    query {
+        for order in ctx.Main.Orders do
         // where(...)
-        select {
-            OrderId = order.OrderId
+        select {
+            OrderId = order.OrderId
             Timezone = 
-                parseTimezoneFunction(order.ShipRegion, order.ShippedDate, customerZone);
+                parseTimezoneFunction(order.ShipRegion, order.ShippedDate, customerZone);
             Status = 
-                if order.ShippedDate > currentDate then "Shipped"
-                elif order.OrderDate > currentDate then "Ordered"
-                elif order.RequiredDate > currentDate then "Late"
+                if order.ShippedDate > currentDate then "Shipped"
+                elif order.OrderDate > currentDate then "Ordered"
+                elif order.RequiredDate > currentDate then "Late"
                 else "Waiting"
             OrderRows = [||];
         }
-    } |> Seq.toArray
+    } |> Seq.toArray
 

You can't have a let inside a select, but you can have custom function calls like parseTimezoneFunction here. Just be careful, they are executed for each result item separately. @@ -1471,31 +1471,31 @@

In the previous example we fetched OrderRows as empty array. Now we populate those with one query in immutable way:

-
let orders = fetchOrders 123
+
let orders = fetchOrders 123
 
-let orderIds = 
-    orders 
-    |> Array.map(fun o -> o.OrderId) 
-    |> Array.distinct
+let orderIds = 
+    orders 
+    |> Array.map(fun o -> o.OrderId) 
+    |> Array.distinct
     
 // Fetch all rows with one query
-let subItems =
-    query {
-        for row in ctx.Main.OrderDetails do
-        where (orderIds.Contains(row.OrderId))
-        select (row.OrderId, row.ProductId, row.Quantity)
-    } |> Seq.toArray
+let subItems =
+    query {
+        for row in ctx.Main.OrderDetails do
+        where (orderIds.Contains(row.OrderId))
+        select (row.OrderId, row.ProductId, row.Quantity)
+    } |> Seq.toArray
     
-let ordersWithDetails =
-    orders 
-    |> Array.map(fun order ->
-        {order with 
+let ordersWithDetails =
+    orders 
+    |> Array.map(fun order ->
+        {order with 
             // Match the corresponding sub items
             // to a parent item's colleciton:
             OrderRows = 
-                subItems 
-                |> Array.filter(fun (orderId,_,_) -> 
-                    order.OrderId = orderId)
+                subItems 
+                |> Array.filter(fun (orderId,_,_) -> 
+                    order.OrderId = orderId)
                 })
 

How to deal with large IN-queries?

@@ -1504,57 +1504,57 @@

Chunk your collection:

F# has built-in chunkBySize function!

-
let chunked = orderIds |> Array.chunkBySize 100
+
let chunked = orderIds |> Array.chunkBySize 100
 
-for chunk in chunked do
-    let all =
-        query {
-            for row in ctx.Main.OrderDetails do
-            where (chunk.Contains(row.OrderId))
-            select (row)
-        } |> Seq.toArray
+for chunk in chunked do
+    let all =
+        query {
+            for row in ctx.Main.OrderDetails do
+            where (chunk.Contains(row.OrderId))
+            select (row)
+        } |> Seq.toArray
 
-    all |> Array.iter(fun row -> row.Discount <- 0.1)
-    ctx.SubmitUpdates()
+    all |> Array.iter(fun row -> row.Discount <- 0.1)
+    ctx.SubmitUpdates()
 

Creating a nested query

By leaving the last |> Seq.toArray away from your main query you create a lazy IQueryable<...>-query. Which means your IN-objects are not fetched from the database, but is actually a nested query.

-
let nestedOrders =
-    query {
-        for order in ctx.Main.Orders do
+
let nestedOrders =
+    query {
+        for order in ctx.Main.Orders do
         // where(...)
-        select (order.OrderId)
+        select (order.OrderId)
     } 
 
-let subItemsAll =
-    query {
-        for row in ctx.Main.OrderDetails do
-        where (nestedOrders.Contains(row.OrderId))
-        select (row.OrderId, row.ProductId, row.Quantity)
-    } |> Seq.toArray
+let subItemsAll =
+    query {
+        for row in ctx.Main.OrderDetails do
+        where (nestedOrders.Contains(row.OrderId))
+        select (row.OrderId, row.ProductId, row.Quantity)
+    } |> Seq.toArray
 
 // similar as previous fetchOrders
-let fetchOrders2 customerZone =
-    let currentDate = DateTime.UtcNow.Date
-    query {
-        for order in ctx.Main.Orders do
+let fetchOrders2 customerZone =
+    let currentDate = DateTime.UtcNow.Date
+    query {
+        for order in ctx.Main.Orders do
         // where(...)
-        select {
-            OrderId = order.OrderId
+        select {
+            OrderId = order.OrderId
             Timezone = 
-                parseTimezoneFunction(order.ShipRegion, order.ShippedDate, customerZone);
+                parseTimezoneFunction(order.ShipRegion, order.ShippedDate, customerZone);
             Status = 
-                if order.ShippedDate > currentDate then "Shipped"
-                elif order.OrderDate > currentDate then "Ordered"
-                elif order.RequiredDate > currentDate then "Late"
+                if order.ShippedDate > currentDate then "Shipped"
+                elif order.OrderDate > currentDate then "Ordered"
+                elif order.RequiredDate > currentDate then "Late"
                 else "Waiting"
             OrderRows = 
-                subItemsAll |> (Array.filter(fun (orderId,_,_) -> 
-                    order.OrderId = orderId));
+                subItemsAll |> (Array.filter(fun (orderId,_,_) -> 
+                    order.OrderId = orderId));
         }
-    } |> Seq.toArray
+    } |> Seq.toArray
 

That way order hit count doesn't matter as the database is taking care of it.

Group-by and more complex query scenarios

@@ -1562,23 +1562,23 @@

let freightsByCity = - query { - for o in ctx.Main.Orders do +
let freightsByCity =
+    query {
+        for o in ctx.Main.Orders do
         //where (...)
-        groupBy o.ShipCity into cites
-        select (cites.Key, cites.Sum(fun order -> order.Freight))
-    } |> Array.executeQueryAsync
+        groupBy o.ShipCity into cites
+        select (cites.Key, cites.Sum(fun order -> order.Freight))
+    } |> Array.executeQueryAsync
 

Group-by is support is limited, mostly for single tables only. F# Linq query syntax doesnt support doing select count(1), sum(UnitPrice) from Products but you can group by a constant to get that:

-
let qry = 
-    query {
-        for p in ctx.Main.Products do
-        groupBy 1 into g
-        select (g.Count(), g.Sum(fun p -> p.UnitPrice))
-    } |> Seq.head
+
let qry = 
+    query {
+        for p in ctx.Main.Products do
+        groupBy 1 into g
+        select (g.Count(), g.Sum(fun p -> p.UnitPrice))
+    } |> Seq.head
 

For more info see:

@@ -1522,7 +1522,7 @@

data : - (string * 'f) seq + (string * 'a) seq
diff --git a/reference/fsharp-data-sql-common-sqlitelibrary.html b/reference/fsharp-data-sql-common-sqlitelibrary.html index 4348ed61..367db357 100644 --- a/reference/fsharp-data-sql-common-sqlitelibrary.html +++ b/reference/fsharp-data-sql-common-sqlitelibrary.html @@ -269,6 +269,8 @@

, IConvertible , + ISpanFormattable + , IFormattable
diff --git a/reference/fsharp-data-sql-common-table.html b/reference/fsharp-data-sql-common-table.html index 44a304b6..0768cc03 100644 --- a/reference/fsharp-data-sql-common-table.html +++ b/reference/fsharp-data-sql-common-table.html @@ -282,6 +282,10 @@

IConvertible , IEquatable<string> + , + ISpanParsable<string> + , + IParsable<string>

diff --git a/reference/fsharp-data-sql-providers-duckdb.html b/reference/fsharp-data-sql-providers-duckdb.html index d436ef58..f67798d4 100644 --- a/reference/fsharp-data-sql-providers-duckdb.html +++ b/reference/fsharp-data-sql-providers-duckdb.html @@ -1076,7 +1076,7 @@


Returns: - (int * IDbDataParameter)[] * (int * IDbDataParameter)[] + (int * IDbDataParameter) array * (int * IDbDataParameter) array

@@ -1115,7 +1115,7 @@

Returns: - (int * IDbDataParameter)[] * (int * IDbDataParameter)[] + (int * IDbDataParameter) array * (int * IDbDataParameter) array
diff --git a/reference/fsharp-data-sql-providers-firebird.html b/reference/fsharp-data-sql-providers-firebird.html index c4ba6bef..6eed071b 100644 --- a/reference/fsharp-data-sql-providers-firebird.html +++ b/reference/fsharp-data-sql-providers-firebird.html @@ -1161,7 +1161,7 @@


Returns: - (int * IDbDataParameter)[] * (int * IDbDataParameter)[] + (int * IDbDataParameter) array * (int * IDbDataParameter) array
@@ -1200,7 +1200,7 @@

Returns: - (int * IDbDataParameter)[] * (int * IDbDataParameter)[] + (int * IDbDataParameter) array * (int * IDbDataParameter) array
diff --git a/reference/fsharp-data-sql-providers-mssqlserver.html b/reference/fsharp-data-sql-providers-mssqlserver.html index bf277d95..9afaea4f 100644 --- a/reference/fsharp-data-sql-providers-mssqlserver.html +++ b/reference/fsharp-data-sql-providers-mssqlserver.html @@ -1164,7 +1164,7 @@


Returns: - (int * string * IDbDataParameter)[] * (int * string * IDbDataParameter)[] + (int * string * IDbDataParameter) array * (int * string * IDbDataParameter) array
@@ -1203,7 +1203,7 @@

Returns: - (int * string * IDbDataParameter)[] * (int * string * IDbDataParameter)[] + (int * string * IDbDataParameter) array * (int * string * IDbDataParameter) array
diff --git a/reference/fsharp-data-sql-providers-mssqlserverdynamic.html b/reference/fsharp-data-sql-providers-mssqlserverdynamic.html index 21c4ee1b..4a21d8b1 100644 --- a/reference/fsharp-data-sql-providers-mssqlserverdynamic.html +++ b/reference/fsharp-data-sql-providers-mssqlserverdynamic.html @@ -1298,7 +1298,7 @@


Returns: - (int * string * IDbDataParameter)[] * (int * string * IDbDataParameter)[] + (int * string * IDbDataParameter) array * (int * string * IDbDataParameter) array
@@ -1337,7 +1337,7 @@

Returns: - (int * string * IDbDataParameter)[] * (int * string * IDbDataParameter)[] + (int * string * IDbDataParameter) array * (int * string * IDbDataParameter) array
diff --git a/reference/fsharp-data-sql-providers-mysql.html b/reference/fsharp-data-sql-providers-mysql.html index c02af401..b3917b88 100644 --- a/reference/fsharp-data-sql-providers-mysql.html +++ b/reference/fsharp-data-sql-providers-mysql.html @@ -1115,7 +1115,7 @@


Returns: - (int * IDbDataParameter)[] * (int * IDbDataParameter)[] + (int * IDbDataParameter) array * (int * IDbDataParameter) array
@@ -1154,7 +1154,7 @@

Returns: - (int * IDbDataParameter)[] * (int * IDbDataParameter)[] + (int * IDbDataParameter) array * (int * IDbDataParameter) array
diff --git a/reference/fsharp-data-sql-providers-postgresql.html b/reference/fsharp-data-sql-providers-postgresql.html index 0517f493..1b52e88d 100644 --- a/reference/fsharp-data-sql-providers-postgresql.html +++ b/reference/fsharp-data-sql-providers-postgresql.html @@ -1162,7 +1162,7 @@


Returns: - (int * IDbDataParameter)[] * (int * IDbDataParameter)[] + (int * IDbDataParameter) array * (int * IDbDataParameter) array
@@ -1201,7 +1201,7 @@

Returns: - (int * IDbDataParameter)[] * (int * IDbDataParameter)[] + (int * IDbDataParameter) array * (int * IDbDataParameter) array
diff --git a/reference/fsharp-data-sql-quotationhelpers.html b/reference/fsharp-data-sql-quotationhelpers.html index c187fa8b..009099f2 100644 --- a/reference/fsharp-data-sql-quotationhelpers.html +++ b/reference/fsharp-data-sql-quotationhelpers.html @@ -377,7 +377,7 @@

fields : - obj[] + obj array
@@ -406,7 +406,7 @@

fields : - obj[] + obj array
diff --git a/reference/fsharp-data-sql-runtime-sqldatacontext.html b/reference/fsharp-data-sql-runtime-sqldatacontext.html index 772b1a80..cfef1625 100644 --- a/reference/fsharp-data-sql-runtime-sqldatacontext.html +++ b/reference/fsharp-data-sql-runtime-sqldatacontext.html @@ -354,7 +354,7 @@

referencedAssemblies : - string[] + string array
@@ -495,7 +495,7 @@

referencedAssemblies : - string[] + string array
diff --git a/reference/fsharp-data-sql-schema-columnlookup.html b/reference/fsharp-data-sql-schema-columnlookup.html index c5e6720f..6afde6cb 100644 --- a/reference/fsharp-data-sql-schema-columnlookup.html +++ b/reference/fsharp-data-sql-schema-columnlookup.html @@ -273,6 +273,8 @@

, IReadOnlyCollection<KeyValuePair<string, Column>> , + IStructuralEquatable + , IComparable , IDictionary<string, Column> diff --git a/reference/fsharp-data-sql-schema-sproc.html b/reference/fsharp-data-sql-schema-sproc.html index 6d6fe4f2..168f6f21 100644 --- a/reference/fsharp-data-sql-schema-sproc.html +++ b/reference/fsharp-data-sql-schema-sproc.html @@ -314,7 +314,7 @@

- +

@@ -539,7 +539,7 @@


Returns: - Type[] + Type array

@@ -552,7 +552,7 @@

Returns: - Type[] + Type array

diff --git a/reference/fsharp-data-sql-schema.html b/reference/fsharp-data-sql-schema.html index 7b6d7d47..fac4593e 100644 --- a/reference/fsharp-data-sql-schema.html +++ b/reference/fsharp-data-sql-schema.html @@ -280,7 +280,7 @@

- +

@@ -307,7 +307,7 @@

- +

@@ -334,7 +334,7 @@

- +

@@ -361,7 +361,7 @@

- +

@@ -388,7 +388,7 @@

- +

@@ -415,7 +415,7 @@

- +

@@ -442,7 +442,7 @@

- +

@@ -469,7 +469,7 @@

- +

@@ -496,7 +496,7 @@

- +

@@ -523,7 +523,7 @@

- +

@@ -550,7 +550,7 @@

- +

diff --git a/reference/fsharp-data-sql-selectoperations.html b/reference/fsharp-data-sql-selectoperations.html index 4c311770..390ab2c8 100644 --- a/reference/fsharp-data-sql-selectoperations.html +++ b/reference/fsharp-data-sql-selectoperations.html @@ -269,6 +269,8 @@

, IConvertible , + ISpanFormattable + , IFormattable
diff --git a/reference/fsharp-data-sql-ssdt-dacpacparser-regexparsers.html b/reference/fsharp-data-sql-ssdt-dacpacparser-regexparsers.html index 4752664f..b9214f86 100644 --- a/reference/fsharp-data-sql-ssdt-dacpacparser-regexparsers.html +++ b/reference/fsharp-data-sql-ssdt-dacpacparser-regexparsers.html @@ -455,7 +455,7 @@


Returns: - CommentAnnotation[] + CommentAnnotation array
@@ -495,7 +495,7 @@

Returns: - CommentAnnotation[] + CommentAnnotation array

@@ -534,7 +534,7 @@


Returns: - string[] + string array
@@ -575,7 +575,7 @@

Returns: - string[] + string array
diff --git a/reference/fsharp-data-sql-ssdt-dacpacparser-ssdtuserdefineddatatype.html b/reference/fsharp-data-sql-ssdt-dacpacparser-ssdtuserdefineddatatype.html index 24c98afd..a9c70430 100644 --- a/reference/fsharp-data-sql-ssdt-dacpacparser-ssdtuserdefineddatatype.html +++ b/reference/fsharp-data-sql-ssdt-dacpacparser-ssdtuserdefineddatatype.html @@ -279,6 +279,8 @@

, IReadOnlyCollection<KeyValuePair<UDDTName, UDDTInheritedType>> , + IStructuralEquatable + , IComparable , IDictionary<UDDTName, UDDTInheritedType> diff --git a/reference/fsharp-data-sql-transactions-isolationlevel.html b/reference/fsharp-data-sql-transactions-isolationlevel.html index a726f7ae..aa4e78fb 100644 --- a/reference/fsharp-data-sql-transactions-isolationlevel.html +++ b/reference/fsharp-data-sql-transactions-isolationlevel.html @@ -269,6 +269,8 @@

, IConvertible , + ISpanFormattable + , IFormattable