Git Product home page Git Product logo

g1's Introduction

g1's People

Contributors

remexre avatar

Watchers

 avatar  avatar  avatar

g1's Issues

Transactions

Maybe have:

trait TransactionConnection: Connection {
	type Transaction: Connection;
	async fn start_transaction(&self, timeout: Duration) -> Transaction;
}

It'd be nice to allow the transaction to have its lifetime bounded by the connection, but this requires GATs...

A kinda gross solution might be:

trait TransactionConnectionInner {
	type Connection: Connection;

	async fn create_atom(&self, conn: &Self::Connection) -> Result<Atom, Self::Error>;
	// etc
}

struct Transaction<'a, T: TransactionConnectionInner> {
	connection: &'a T::Connection,
	inner: T,
}

impl<'a, T: TransactionConnectionInner> Connection for Transaction<'a, T> {
	// ...
}

trait TransactionConnection: Connection {
	type TransactionConnectionInner: TransactionConnectionInner<Connection = Self>;
	async fn start_transaction<'a>(&'a self, timeout: Duration) -> Transaction<'a, TransactionConnectionInner>;
}

Less-naive evaluator

  • Only query from DB if needed
  • Batch DB queries together? Could do a similar transformation to Haxl, potentially.
  • Magic Sets (slides)

Native backend

It'd be nice for both NIH, and for being able to more confidently assert the formal properties the database should have, to have a native backend rather than just the current SQLite-backed one.

Problems to solve:

Allow interpolation in queries

eg query! { ?- edge($(from), To, "contains"). }

nb this necessitates a less efficient implementation than the current one; maybe make the string pool global, and make the query macro generate lazy_statics to hold references to the strings within?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.