Avanade/DbEx

Invalid comment or missing functionality?

karpikpl opened this issue · 3 comments

Logger.LogInformation($" Probing for embedded resources: {string.Join(", ", GetNamespacesWithSuffix($"{DataNamespace}.*.sql", true))}");
var list = new List<(Assembly Assembly, string ResourceName)>();
foreach (var ass in Assemblies)
{
foreach (var rn in ass.GetManifestResourceNames())
{
// Filter on schema namespace prefix and suffix of '.sql'.
if (!Namespaces.Any(x => rn.StartsWith($"{x}.{DataNamespace}.", StringComparison.InvariantCulture) && (rn.EndsWith(".yaml", StringComparison.InvariantCultureIgnoreCase) || rn.EndsWith(".yml", StringComparison.InvariantCultureIgnoreCase))))
continue;
list.Add((ass, rn));
}
}

Line 366 mentions .sql files but 379 looks for .yml and .yaml

looks like that feature is not there.

it would be useful to either:

  1. support SQL files for data command, OR
  2. support SQL files for execute command

@chullybun what do you think makes more sense?

Hi @karpikpl. The code above is correct, the comments are incorrect - YAML is the intended. I had not considered supporting executing .sql for the two scenarios you suggest - those are great ideas and will look to add.

@karpikpl - I have just published v1.0.2 NuGet package. Support for SQL files added as described above.