Re: String import an entire directory

2017-11-14 Thread Adrian Matoga via Digitalmars-d
On Monday, 13 November 2017 at 16:18:06 UTC, Andre Pany wrote: Three is a use case. (...) Yeah, I could probably find more use cases, but from the OP's question it's not clear what would be the benefit of doing it at compile time in OP's case.

Re: String import an entire directory

2017-11-13 Thread Andre Pany via Digitalmars-d
On Monday, 13 November 2017 at 09:27:10 UTC, Adrian Matoga wrote: On Saturday, 11 November 2017 at 14:11:50 UTC, Neia Neutuladh wrote: At my job, I put together a database migration tool for our services. It scans for resources in your JAR file with an appropriate path, interprets them as SQL s

Re: String import an entire directory

2017-11-13 Thread Adrian Matoga via Digitalmars-d
On Saturday, 11 November 2017 at 14:11:50 UTC, Neia Neutuladh wrote: At my job, I put together a database migration tool for our services. It scans for resources in your JAR file with an appropriate path, interprets them as SQL scripts, and applies them to the database if it hasn't been done ye

Re: String import an entire directory

2017-11-12 Thread crimaniak via Digitalmars-d
On Saturday, 11 November 2017 at 14:11:50 UTC, Neia Neutuladh wrote: I can make a prebuild script to generate code for this, but I'm wondering: do other people find themselves needing this periodically? If so, I can write a DIP for it, or at least publish a codegen tool that other people can us

Re: String import an entire directory

2017-11-11 Thread Jonathan M Davis via Digitalmars-d
On Saturday, November 11, 2017 15:35:23 Neia Neutuladh via Digitalmars-d wrote: > On Saturday, 11 November 2017 at 15:00:03 UTC, Jonathan M Davis > > wrote: > > You could always generate a file with the list of files that > > you want to import and then use that to generate the import > > statemen

Re: String import an entire directory

2017-11-11 Thread Neia Neutuladh via Digitalmars-d
On Saturday, 11 November 2017 at 15:00:03 UTC, Jonathan M Davis wrote: You could always generate a file with the list of files that you want to import and then use that to generate the import statements to import each file. That's exactly what I was talking about doing. I guess I need to work

Re: String import an entire directory

2017-11-11 Thread Jonathan M Davis via Digitalmars-d
On Saturday, November 11, 2017 14:11:50 Neia Neutuladh via Digitalmars-d wrote: > At my job, I put together a database migration tool for our > services. It scans for resources in your JAR file with an > appropriate path, interprets them as SQL scripts, and applies > them to the database if it has

String import an entire directory

2017-11-11 Thread Neia Neutuladh via Digitalmars-d
At my job, I put together a database migration tool for our services. It scans for resources in your JAR file with an appropriate path, interprets them as SQL scripts, and applies them to the database if it hasn't been done yet. I want to implement this in D. However, while D allows you to im