本文整理汇总了C#中Expr.memcpy方法的典型用法代码示例。如果您正苦于以下问题:C# Expr.memcpy方法的具体用法?C# Expr.memcpy怎么用?C# Expr.memcpy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Expr
的用法示例。
在下文中一共展示了Expr.memcpy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveAlias
static void ResolveAlias(Parse parse, ExprList list, int colId, Expr expr, string type, int subqueries)
{
Debug.Assert(colId >= 0 && colId < list.Exprs);
Expr orig = list.Ids[colId].Expr; // The iCol-th column of the result set
Debug.Assert(orig != null);
Debug.Assert((orig.Flags & EP.Resolved) != 0);
Context ctx = parse.Ctx; // The database connection
Expr dup = Expr.Dup(ctx, orig, 0); // Copy of pOrig
if (orig.OP != TK.COLUMN && (type.Length == 0 || type[0] != 'G'))
{
IncrAggFunctionDepth(dup, subqueries);
dup = Expr.PExpr_(parse, TK.AS, dup, null, null);
if (dup == null) return;
if (list.Ids[colId].Alias == 0)
list.Ids[colId].Alias = (ushort)(++parse.Alias.length);
dup.TableId = list.Ids[colId].Alias;
}
if (expr.OP == TK.COLLATE)
dup = Expr.AddCollateString(parse, dup, expr.u.Token);
// Before calling sqlite3ExprDelete(), set the EP_Static flag. This prevents ExprDelete() from deleting the Expr structure itself,
// allowing it to be repopulated by the memcpy() on the following line.
E.ExprSetProperty(expr, EP.Static);
Expr.Delete(ctx, ref expr);
expr.memcpy(dup);
if (!E.ExprHasProperty(expr, EP.IntValue) && expr.u.Token != null)
{
Debug.Assert((dup.Flags & (EP.Reduced | EP.TokenOnly)) == 0);
dup.u.Token = expr.u.Token;
dup.Flags2 |= EP2.MallocedToken;
}
C._tagfree(ctx, ref dup);
}