Saxonite v1.1.0
This commit is contained in:
@@ -188,7 +188,7 @@ namespace Sarand.Net.Standard.Base.Bus
|
|||||||
if (Changed) return;
|
if (Changed) return;
|
||||||
Changed = ((int)(oldValue as IConvertible) != (int)(newValue as IConvertible));
|
Changed = ((int)(oldValue as IConvertible) != (int)(newValue as IConvertible));
|
||||||
}
|
}
|
||||||
protected void CheckChanged (int oldValue, int newValue)
|
protected void CheckChanged (long oldValue, long newValue)
|
||||||
{
|
{
|
||||||
if (Changed) return;
|
if (Changed) return;
|
||||||
Changed = (oldValue != newValue);
|
Changed = (oldValue != newValue);
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ namespace Sarand.Net.Standard.Base.Utils
|
|||||||
{
|
{
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// Definitions.
|
// Definitions.
|
||||||
|
public static String Format_SqlDate { get; } = "yyyy-MM-dd";
|
||||||
|
public static String Format_SqlTime { get; } = "HH:mm:ss.fff";
|
||||||
|
public static String Delim_SqlTime { get; } = " ";
|
||||||
|
public static String Format_SqlDateTime { get; } = Format_SqlDate + Delim_SqlTime + Format_SqlTime;
|
||||||
public static String Format_XmlDate { get; } = "yyyy-MM-dd";
|
public static String Format_XmlDate { get; } = "yyyy-MM-dd";
|
||||||
public static String Format_XmlTime { get; } = "HH:mm:ss";
|
public static String Format_XmlTime { get; } = "HH:mm:ss";
|
||||||
public static String Delim_XmlTime { get; } = "T";
|
public static String Delim_XmlTime { get; } = "T";
|
||||||
@@ -571,19 +575,36 @@ namespace Sarand.Net.Standard.Base.Utils
|
|||||||
return String.Empty;
|
return String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------
|
||||||
|
/// <summary>Format as SQL date: 'yyyy-MM-dd'</summary>
|
||||||
|
public static String FormatSqlDate(this DateTime value)
|
||||||
|
{
|
||||||
|
return Format(value, Format_SqlDate);
|
||||||
|
}
|
||||||
|
/// <summary>Format as SQL time: 'HH:mm:ss'</summary>
|
||||||
|
public static String FormatSqlTime(this DateTime value)
|
||||||
|
{
|
||||||
|
return Format(value, Format_SqlTime);
|
||||||
|
}
|
||||||
|
/// <summary>Format as SQL datetime: 'yyyy-MM-ddTHH:mm:ss'</summary>
|
||||||
|
public static String FormatSqlDateTime(this DateTime value)
|
||||||
|
{
|
||||||
|
return Format(value, Format_SqlDateTime);
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
/// <summary>Format as XML date: 'yyyy-MM-dd'</summary>
|
/// <summary>Format as XML date: 'yyyy-MM-dd'</summary>
|
||||||
public static String FormatXmlDate (this DateTime value)
|
public static String FormatXmlDate(this DateTime value)
|
||||||
{
|
{
|
||||||
return Format(value, Format_XmlDate);
|
return Format(value, Format_XmlDate);
|
||||||
}
|
}
|
||||||
/// <summary>Format as XML time: 'HH:mm:ss'</summary>
|
/// <summary>Format as XML time: 'HH:mm:ss'</summary>
|
||||||
public static String FormatXmlTime (this DateTime value)
|
public static String FormatXmlTime(this DateTime value)
|
||||||
{
|
{
|
||||||
return Format(value, Format_XmlTime);
|
return Format(value, Format_XmlTime);
|
||||||
}
|
}
|
||||||
/// <summary>Format as XML datetime: 'yyyy-MM-ddTHH:mm:ss'</summary>
|
/// <summary>Format as XML datetime: 'yyyy-MM-ddTHH:mm:ss'</summary>
|
||||||
public static String FormatXmlDateTime (this DateTime value)
|
public static String FormatXmlDateTime(this DateTime value)
|
||||||
{
|
{
|
||||||
return Format(value, Format_XmlDateTime);
|
return Format(value, Format_XmlDateTime);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -368,6 +368,7 @@ namespace Sarand.Net.Standard.Dbas.Data
|
|||||||
// Only populate table names if not previously done.
|
// Only populate table names if not previously done.
|
||||||
if (tables.Count < 1 || refresh)
|
if (tables.Count < 1 || refresh)
|
||||||
{
|
{
|
||||||
|
tables.Clear();
|
||||||
using (DbConnection dbConnection = CreateConnection(true))
|
using (DbConnection dbConnection = CreateConnection(true))
|
||||||
{
|
{
|
||||||
dbConnection.Open();
|
dbConnection.Open();
|
||||||
@@ -862,6 +863,15 @@ namespace Sarand.Net.Standard.Dbas.Data
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Query to list included columns.
|
||||||
|
// Select IndexName = i.Name, ColName = c.Name
|
||||||
|
// From sys.indexes i
|
||||||
|
// Inner Join sys.index_columns ic On ic.object_id = i.object_id And ic.index_id = i.index_id
|
||||||
|
// Inner Join sys.columns c On c.object_id = ic.object_id And c.column_id = ic.column_id
|
||||||
|
// Where ic.is_included_column = 1
|
||||||
|
// Order By i.Name
|
||||||
|
|
||||||
// Attempt to retrieve included columns (SQL only).
|
// Attempt to retrieve included columns (SQL only).
|
||||||
SqlConnection sqlConnection = dbConnection as SqlConnection;
|
SqlConnection sqlConnection = dbConnection as SqlConnection;
|
||||||
if (sqlConnection != null)
|
if (sqlConnection != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user