Commit Graph

12 Commits

Author SHA1 Message Date
Sean Griffin
446c7e3a1f First pass at schema inference
This macro takes a database connection at compile time, inquires about
the schema, and invoke the `table!` macro for you automatically. This is
an early pass, and it doesn't support any types from third party crates,
or custom primary keys (I'm not even 100% sure that it won't error some
of the time on types that we do support).

Right now we're going off of the type name and capitalizing it to find
the right type. I'm unsure if we'd be better off using the OID (and then
the aliases would be `Oid6342 = Array<Json>` or whatever). We do need to
decide that before 1.0, as it'll be a breaking change for third party
crates.

I've had to do some funkiness in our tests, where basically I set up the
schema on a separate database from where our tests run. This is because
our suite assumes that we can rely on the id 1, which means the table
has to be created in that test. I cannot drop the tables before the
tests run, because on nightly I don't have a place to execute code after
compilation finishes.

As such, this doesn't actually make our tests look much cleaner, but
once we refactor to work w/ persistenct schema we should be able to
remove a lot of code.
2015-12-04 16:16:38 -07:00
Sean Griffin
991edd9cac Only build travis on master
For some reason the build badge uses *all* branches and not just master.
I can't remember if this fucks with PRs or not, but we'll find out
2015-12-03 14:23:44 -07:00
Sean Griffin
af8daade8f I should probably tell Travis about the new name 2015-11-29 10:46:53 -07:00
Sean Griffin
b4fed34c69 Update the travis build to work on nightly
We need to exclude default features when `unstable` is included, or
we'll end up having syntex in codegen, but trying to use rustc_plugin
from tests
2015-11-28 15:22:54 -07:00
Sean Griffin
1ba9053c61 Get the build working on stable and beta
This introduces syntex as a dependency on stable, which will pre-process
the appropriate files for annotations. We need to document this process
somewhere.

Fixes #15
2015-11-28 14:23:04 -07:00
Sean Griffin
6f999b7123 We need to build the docs to upload them
I wish I could do this on a branch...
2015-11-28 12:46:12 -07:00
Sean Griffin
954a2d9724 Actually give travis the ability to upload docs 2015-11-28 12:41:21 -07:00
Sean Griffin
a7caa2faf9 Upload docs from travis 2015-11-28 12:32:35 -07:00
Sean Griffin
dd3c68c374 Get travis up and running, on the latest nightly
Wow, so apparently we don't built on stable or beta, not because of the
compiler plugins, but because `For<i32> for i64` isn't on stable, and
`For<i32> for f64` is only on nightly. Additionally, there was a
breaking change in compiler plugins *tonight*, which I've updated for
(and am pointing at a local branch for dependencies until it gets fixed
upstream).

Sorry for the breakage folks, I know it's a pain. Update to tonights
nightly, it's now the only thing we work on, because I don't know how to
make travis go to last nights. We'll be on stable by the end of the
week.
2015-11-27 16:52:40 -07:00
Sean Griffin
8da8b17ca3 Apparently we don't build on stable
Ok, I mean I knew that our tests wouldn't work yet because I haven't
added syntex, but that's not even the problem. Apparently the *real*
reason we don't work on stable is that `From<i32> for i64` is only
implemented on beta and `From<i32> for f64` is only nightly. I figured
there were reasons I couldn't target stable, but really????
2015-11-27 16:19:04 -07:00
Sean Griffin
cd031ecb8d Actually give travis a valid script
It won't pass, as PG isn't installed and I'm not setting the proper env
vars, but it's a start
2015-11-27 16:13:07 -07:00
Sean Griffin
3b96273339 Add travis 2015-11-26 12:11:57 -07:00