Skip to content

Commit

Permalink
Fix generator
Browse files Browse the repository at this point in the history
  • Loading branch information
quinchs committed Jan 13, 2024
1 parent 0587f02 commit afcbcf6
Show file tree
Hide file tree
Showing 89 changed files with 3,229 additions and 3,061 deletions.
3,460 changes: 1,729 additions & 1,731 deletions src/EdgeDB.Net.QueryBuilder/EdgeQL.g.cs

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions src/EdgeDB.Net.QueryBuilder/EdgeQL.test.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#pragma warning disable
using EdgeDB.Operators;
using EdgeDB.DataTypes;
using EdgeDB.Models.DataTypes;
using System.Numerics;
using EdgeDB.Models.DataTypes;
using DateTime = System.DateTime;

namespace EdgeDB
Expand Down Expand Up @@ -38,7 +38,7 @@ public static IEnumerable<TType> AssertDistinct<TType>(IEnumerable<TType> input,
/// <summary>
/// Return the element of *array* at the specified *index*.
/// </summary>
public static TType? ArrayGet<TType>(IEnumerable<TType> array, Int64 idx, TType? @default)
public static TType? ArrayGet<TType>(IEnumerable<TType> array, Int64 idx, TType? @default = default)
=> default!;
/// <summary>
/// Return array elements as a set.
Expand Down Expand Up @@ -237,7 +237,7 @@ public static Int64 SequenceReset(Type seq, Int64 value)
/// <summary>
/// Create a `int64` value.
/// </summary>
public static Int64 ToInt64(String s, String? fmt)
public static Int64 ToInt64(String s, String? fmt = null)
=> default!;
public static Int64 SequenceReset(Type seq)
=> default!;
Expand Down Expand Up @@ -266,7 +266,7 @@ public static BigInteger Round(BigInteger val)
/// <summary>
/// Create a `bigint` value.
/// </summary>
public static BigInteger ToBigint(String s, String? fmt)
public static BigInteger ToBigint(String s, String? fmt = null)
=> default!;
/// <summary>
/// Round up to the nearest integer.
Expand Down Expand Up @@ -303,7 +303,7 @@ public static IEnumerable<Decimal> RangeUnpack(Range<Decimal> val, Decimal step)
/// <summary>
/// Create a `decimal` value.
/// </summary>
public static Decimal ToDecimal(String s, String? fmt)
public static Decimal ToDecimal(String s, String? fmt = null)
=> default!;
/// <summary>
/// Round up to the nearest integer.
Expand Down Expand Up @@ -370,7 +370,7 @@ public static IEnumerable<Single> RangeUnpack(Range<Single> val, Single step)
/// <summary>
/// Create a `float32` value.
/// </summary>
public static Single ToFloat32(String s, String? fmt)
public static Single ToFloat32(String s, String? fmt = null)
=> default!;
/// <summary>
/// Return the sum of the set of numbers.
Expand Down Expand Up @@ -402,7 +402,7 @@ public static IEnumerable<Double> RangeUnpack(Range<Double> val, Double step)
/// <summary>
/// Create a `float64` value.
/// </summary>
public static Double ToFloat64(String s, String? fmt)
public static Double ToFloat64(String s, String? fmt = null)
=> default!;
/// <summary>
/// Round up to the nearest integer.
Expand Down Expand Up @@ -537,7 +537,7 @@ public static String JsonTypeof(Json json)
/// <summary>
/// Replace matching substrings in a given string.
/// </summary>
public static String ReReplace(String pattern, String sub, String str, String flags)
public static String ReReplace(String pattern, String sub, String str, String flags = "")
=> default!;
/// <summary>
/// Repeat the input *string* *n* times.
Expand All @@ -562,47 +562,47 @@ public static String StrTitle(String s)
/// <summary>
/// Return the input string padded at the start to the length *n*.
/// </summary>
public static String StrPadStart(String s, Int64 n, String fill = )
public static String StrPadStart(String s, Int64 n, String fill = " ")
=> default!;
/// <summary>
/// Return the input string left-padded to the length *n*.
/// </summary>
public static String StrLpad(String s, Int64 n, String fill = )
public static String StrLpad(String s, Int64 n, String fill = " ")
=> default!;
/// <summary>
/// Return the input string padded at the end to the length *n*.
/// </summary>
public static String StrPadEnd(String s, Int64 n, String fill = )
public static String StrPadEnd(String s, Int64 n, String fill = " ")
=> default!;
/// <summary>
/// Return the input string right-padded to the length *n*.
/// </summary>
public static String StrRpad(String s, Int64 n, String fill = )
public static String StrRpad(String s, Int64 n, String fill = " ")
=> default!;
/// <summary>
/// Return the input string with all *trim* characters removed from its start.
/// </summary>
public static String StrTrimStart(String s, String tr = )
public static String StrTrimStart(String s, String tr = " ")
=> default!;
/// <summary>
/// Return the input string with all leftmost *trim* characters removed.
/// </summary>
public static String StrLtrim(String s, String tr = )
public static String StrLtrim(String s, String tr = " ")
=> default!;
/// <summary>
/// Return the input string with all *trim* characters removed from its end.
/// </summary>
public static String StrTrimEnd(String s, String tr = )
public static String StrTrimEnd(String s, String tr = " ")
=> default!;
/// <summary>
/// Return the input string with all rightmost *trim* characters removed.
/// </summary>
public static String StrRtrim(String s, String tr = )
public static String StrRtrim(String s, String tr = " ")
=> default!;
/// <summary>
/// Return the input string with *trim* characters removed from both ends.
/// </summary>
public static String StrTrim(String s, String tr = )
public static String StrTrim(String s, String tr = " ")
=> default!;
/// <summary>
/// Given a string, find a matching substring and replace all its occurrences with a new substring.
Expand All @@ -617,32 +617,32 @@ public static String StrReverse(String s)
/// <summary>
/// Return string representation of the input value.
/// </summary>
public static String ToStr(DateTimeOffset dt, String? fmt)
public static String ToStr(DateTimeOffset dt, String? fmt = null)
=> default!;
/// <summary>
/// Return string representation of the input value.
/// </summary>
public static String ToStr(TimeSpan td, String? fmt)
public static String ToStr(TimeSpan td, String? fmt = null)
=> default!;
/// <summary>
/// Return string representation of the input value.
/// </summary>
public static String ToStr(Int64 i, String? fmt)
public static String ToStr(Int64 i, String? fmt = null)
=> default!;
/// <summary>
/// Return string representation of the input value.
/// </summary>
public static String ToStr(Double f, String? fmt)
public static String ToStr(Double f, String? fmt = null)
=> default!;
/// <summary>
/// Return string representation of the input value.
/// </summary>
public static String ToStr(BigInteger d, String? fmt)
public static String ToStr(BigInteger d, String? fmt = null)
=> default!;
/// <summary>
/// Return string representation of the input value.
/// </summary>
public static String ToStr(Decimal d, String? fmt)
public static String ToStr(Decimal d, String? fmt = null)
=> default!;
/// <summary>
/// Return string representation of the input value.
Expand All @@ -652,7 +652,7 @@ public static String ToStr(IEnumerable<String> array, String delimiter)
/// <summary>
/// Return string representation of the input value.
/// </summary>
public static String ToStr(Json json, String? fmt)
public static String ToStr(Json json, String? fmt = null)
=> default!;
/// <summary>
/// Convert a binary UTF-8 string to a text value.
Expand All @@ -677,17 +677,17 @@ public static String GetCurrentDatabase()
/// <summary>
/// Return string representation of the input value.
/// </summary>
public static String ToStr(DateTime dt, String? fmt)
public static String ToStr(DateTime dt, String? fmt = null)
=> default!;
/// <summary>
/// Return string representation of the input value.
/// </summary>
public static String ToStr(DateOnly d, String? fmt)
public static String ToStr(DateOnly d, String? fmt = null)
=> default!;
/// <summary>
/// Encode given data as a base64 string
/// </summary>
public static String Enc(Byte[] data, Base64Alphabet alphabet = enc, Boolean padding = true)
public static String Base64Encode(Byte[] data, Base64Alphabet alphabet = Base64Alphabet.standard, Boolean padding = true)
=> default!;
public static String Concat(String l = null, String r = null)
=> default!;
Expand Down Expand Up @@ -726,7 +726,7 @@ public static IEnumerable<DateTimeOffset> RangeUnpack(Range<DateTimeOffset> val,
/// <summary>
/// Create a `datetime` value.
/// </summary>
public static DateTimeOffset ToDatetime(String s, String? fmt)
public static DateTimeOffset ToDatetime(String s, String? fmt = null)
=> default!;
/// <summary>
/// Create a `datetime` value.
Expand Down Expand Up @@ -791,7 +791,7 @@ public static ValueTuple<Int64, Int64, VersionStage, Int64, IEnumerable<String>>
/// <summary>
/// Search an object using its fts::index index. Returns objects that match the specified query and the matching score.
/// </summary>
public static ValueTuple<TObject, Single>? Search<TObject>(TObject object, String query, String language = eng, IEnumerable<Double>? weights)
public static ValueTuple<TObject, Single>? Search<TObject>(TObject @object, String query, String language = "eng", IEnumerable<Double>? weights = null)
=> default!;
/// <summary>
/// Bitwise AND operator for 16-bit integers.
Expand Down Expand Up @@ -826,7 +826,7 @@ public static Int16 BitLshift(Int16 val, Int64 n)
/// <summary>
/// Create a `int16` value.
/// </summary>
public static Int16 ToInt16(String s, String? fmt)
public static Int16 ToInt16(String s, String? fmt = null)
=> default!;
/// <summary>
/// Bitwise AND operator for 32-bit integers.
Expand Down Expand Up @@ -865,7 +865,7 @@ public static IEnumerable<Int32> RangeUnpack(Range<Int32> val, Int32 step)
/// <summary>
/// Create a `int32` value.
/// </summary>
public static Int32 ToInt32(String s, String? fmt)
public static Int32 ToInt32(String s, String? fmt = null)
=> default!;
/// <summary>
/// Return the array made from all of the input set elements.
Expand Down Expand Up @@ -940,19 +940,19 @@ public static Json JsonObjectPack(IEnumerable<ValueTuple<String, Json>> pairs)
/// <summary>
/// Return the JSON value at the end of the specified path or an empty set.
/// </summary>
public static Json? JsonGet(Json json, IEnumerable<String> path, Json? @default)
public static Json? JsonGet(Json json, IEnumerable<String> path, Json? @default = default)
=> default!;
/// <summary>
/// Return an updated JSON target with a new value.
/// </summary>
public static Json? JsonSet(Json target, IEnumerable<String> path, Json? value, Boolean create_if_missing = true, JsonEmpty empty_treatment = JsonEmpty.ReturnEmpty)
public static Json? JsonSet(Json target, IEnumerable<String> path, Json? value = default, Boolean create_if_missing = true, JsonEmpty empty_treatment = JsonEmpty.ReturnEmpty)
=> default!;
/// <summary>
/// Return JSON value represented by the input *string*.
/// </summary>
public static Json ToJson(String str)
=> default!;
public static Json GetConfigJson(IEnumerable<String>? sources, String? max_source)
public static Json GetConfigJson(IEnumerable<String>? sources = null, String? max_source = null)
=> default!;
public static Json Concat(Json l = default, Json r = default)
=> default!;
Expand All @@ -966,7 +966,7 @@ public static Guid UuidGenerateV1mc()
/// </summary>
public static Guid UuidGenerateV4()
=> default!;
public static Range<TPoint> Range<TPoint>(TPoint? lower, TPoint? upper, Boolean inc_lower = true, Boolean inc_upper = false, Boolean empty = false)
public static Range<TPoint> Range<TPoint>(TPoint? lower = default, TPoint? upper = default, Boolean inc_lower = true, Boolean inc_upper = false, Boolean empty = false)
where TPoint : struct
=> default!;
public static IEnumerable<Range<Int32>> MultirangeUnpack(MultiRange<Int32> val)
Expand Down Expand Up @@ -1002,7 +1002,7 @@ public static Byte[] ToBytes(String s)
/// <summary>
/// Decode the byte64-encoded byte string and return decoded bytes.
/// </summary>
public static Byte[] Enc(String data, Base64Alphabet alphabet = standard, Boolean padding = true)
public static Byte[] Base64Decode(String data, Base64Alphabet alphabet = Base64Alphabet.standard, Boolean padding = true)
=> default!;
public static Byte[] Concat(Byte[] l = null, Byte[] r = null)
=> default!;
Expand All @@ -1014,7 +1014,7 @@ public static TransactionIsolation GetTransactionIsolation()
/// <summary>
/// Create a `cal::local_datetime` value.
/// </summary>
public static DateTime ToLocalDatetime(String s, String? fmt)
public static DateTime ToLocalDatetime(String s, String? fmt = null)
=> default!;
/// <summary>
/// Create a `cal::local_datetime` value.
Expand All @@ -1041,7 +1041,7 @@ public static IEnumerable<DateTime> RangeUnpack(Range<DateTime> val, TimeSpan st
/// <summary>
/// Create a `cal::local_date` value.
/// </summary>
public static DateOnly ToLocalDate(String s, String? fmt)
public static DateOnly ToLocalDate(String s, String? fmt = null)
=> default!;
/// <summary>
/// Create a `cal::local_date` value.
Expand Down Expand Up @@ -1070,7 +1070,7 @@ public static IEnumerable<DateOnly> RangeUnpack(Range<DateOnly> val, TimeSpan st
/// <summary>
/// Create a `cal::local_time` value.
/// </summary>
public static TimeSpan ToLocalTime(String s, String? fmt)
public static TimeSpan ToLocalTime(String s, String? fmt = null)
=> default!;
/// <summary>
/// Create a `cal::local_time` value.
Expand Down Expand Up @@ -1105,7 +1105,7 @@ public static TimeSpan ToDateDuration(Int64 years = 0, Int64 months = 0, Int64 d
/// <summary>
/// Adds language and weight category information to a string, so it be indexed with fts::index.
/// </summary>
public static WithOptions<TEnum>(String text, TEnum language, Weight? weight_category = Weight.A)
public static Document WithOptions<TEnum>(String text, TEnum language, Weight? weight_category = Weight.A)
=> default!;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,40 @@ namespace EdgeDB
internal partial class Grammar
{
[EdgeQLOp("std::DISTINCT")]
public static void Op_1638544350(QueryStringWriter writer, QueryStringWriter.Proxy sParam)
public static void Op_1807904139(QueryStringWriter writer, QueryStringWriter.Proxy sParam)
{
writer.Append("DISTINCT").Append(sParam);
}
[EdgeQLOp("std::UNION")]
public static void Op_2060487352(QueryStringWriter writer, QueryStringWriter.Proxy s1Param, QueryStringWriter.Proxy s2Param)
public static void Op_1104940874(QueryStringWriter writer, QueryStringWriter.Proxy s1Param, QueryStringWriter.Proxy s2Param)
{
writer.Append(s1Param).Wrapped("UNION", " ").Append(s2Param);
}
[EdgeQLOp("std::EXCEPT")]
public static void Op_1858313669(QueryStringWriter writer, QueryStringWriter.Proxy s1Param, QueryStringWriter.Proxy s2Param)
public static void Op_1159339088(QueryStringWriter writer, QueryStringWriter.Proxy s1Param, QueryStringWriter.Proxy s2Param)
{
writer.Append(s1Param).Wrapped("EXCEPT", " ").Append(s2Param);
}
[EdgeQLOp("std::INTERSECT")]
public static void Op_1588561179(QueryStringWriter writer, QueryStringWriter.Proxy s1Param, QueryStringWriter.Proxy s2Param)
public static void Op_313989350(QueryStringWriter writer, QueryStringWriter.Proxy s1Param, QueryStringWriter.Proxy s2Param)
{
writer.Append(s1Param).Wrapped("INTERSECT", " ").Append(s2Param);
}
[EquivalentExpression(ExpressionType.Coalesce)]
[EdgeQLOp("std::??")]
public static void Op_1663167675(QueryStringWriter writer, QueryStringWriter.Proxy lParam, QueryStringWriter.Proxy rParam)
public static void Op_844866030(QueryStringWriter writer, QueryStringWriter.Proxy lParam, QueryStringWriter.Proxy rParam)
{
writer.Append(lParam).Wrapped("??", " ").Append(rParam);
}
[EquivalentExpression(ExpressionType.Conditional)]
[EdgeQLOp("std::IF")]
public static void Op_799215545(QueryStringWriter writer, QueryStringWriter.Proxy if_trueParam, QueryStringWriter.Proxy conditionParam, QueryStringWriter.Proxy if_falseParam)
public static void Op_2099638795(QueryStringWriter writer, QueryStringWriter.Proxy if_trueParam, QueryStringWriter.Proxy conditionParam, QueryStringWriter.Proxy if_falseParam)
{
writer.Append(if_trueParam).Append(" IF ").Append(conditionParam).Append(" ELSE ").Append(if_falseParam);
}
[EquivalentExpression(ExpressionType.ArrayIndex)]
[EdgeQLOp("std::[]")]
public static void Op_1064355627(QueryStringWriter writer, QueryStringWriter.Proxy lParam, QueryStringWriter.Proxy rParam)
public static void Op_1272589386(QueryStringWriter writer, QueryStringWriter.Proxy lParam, QueryStringWriter.Proxy rParam)
{
writer.Append(lParam).Wrapped(rParam, "[]");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ namespace EdgeDB
internal partial class Grammar
{
[EdgeQLOp("std::++")]
public static void Op_599714054(QueryStringWriter writer, QueryStringWriter.Proxy lParam, QueryStringWriter.Proxy rParam)
public static void Op_1137805645(QueryStringWriter writer, QueryStringWriter.Proxy lParam, QueryStringWriter.Proxy rParam)
{
writer.Append(lParam).Wrapped("++", " ").Append(rParam);
}
[EquivalentExpression(ExpressionType.ArrayIndex)]
[EdgeQLOp("std::[]")]
public static void Op_651426742(QueryStringWriter writer, QueryStringWriter.Proxy lParam, QueryStringWriter.Proxy rParam)
public static void Op_1831455023(QueryStringWriter writer, QueryStringWriter.Proxy lParam, QueryStringWriter.Proxy rParam)
{
writer.Append(lParam).Wrapped(rParam, "[]");
}
Expand Down
Loading

0 comments on commit afcbcf6

Please sign in to comment.