partiqldemo

command module
v0.0.0-...-dfe7343 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 11 Imported by: 0

README

PartiQL Demo

This is a Go web server that wraps the PartiQL command line tools in a web interface, to make it easier to use. Try it with a version running on Google Cloud Run.

Usage

  1. Build it with make
  2. Run it with go run . --jar=build/partiqldemo.jar
  3. Visit http://localhost:8080/

Java input

The command line tool reads the "environment" a file, then reads the query from standard input. It then executes the query and prints the output on standard output.

This unfortunately requires starting the JVM then tearing it down. To make the web interface work with lower latency, it also supports a server mode. It reads input from standard input using the following protocol:

  • 4 bytes little endian: length of query
  • 4 bytes little endian: length of environment
  • query bytes (UTF-8)
  • environment bytes (UTF-8)

After reading the input, it writes to standard out

  • 4 bytes little endian: length of output
  • output bytes (UTF-8)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL