public void LoadFile(string file, string name = null) { if (!Path.IsPathRooted(file)) { file = AppContext.BaseDirectory.AppendPath(file); } var function = TransformFunction.ForFile(_options, file, name); AddFunction(function); }
private TransformFunction loadPatchDoc() { var stream = GetType().Assembly.GetManifestResourceStream("Marten.PLv8.mt_patching.js"); var js = stream.ReadAllText().Replace("{databaseSchema}", _options.DatabaseSchemaName); var patching = new TransformFunction(_options, PatchDoc, js); patching.OtherArgs.Add("patch"); Load(patching); return(patching); }
public DocumentTransformOperationFragment(IDocumentStorage storage, TransformFunction function) { _storage = storage; _function = function; }
public void Load(TransformFunction function) { AddFunction(function); }
public void LoadJavascript(string name, string script) { var func = new TransformFunction(_options, name, script); AddFunction(func); }
public TransformSelectClause(TransformFunction function, ISelectClause inner) : base(inner.FromObject, $"{function.Identifier}(d.data)") { }