faktor

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 13 Imported by: 0

README

faktor-mysql

Build Status GitHub release (latest by date) MIT Licence GitHub code size

伪装mysql服务, 用于在开发/测试阶段本机使用, 轻量化本机环境.

项目名: fake viktor

Viktor(维克托): <Arcane: League of Legends>(<英雄联盟:双城之战>)中的角色, 未来的The Machine Herald(机械先驱).

获取可执行文件

  1. 下载最新的可执行文件压缩包并解压

    下载地址: faktor-mysql releases

    Mac系统如无法执行bin文件, 请在 系统偏好设置 -> 安全性与隐私 中允许程序运行

$ tar -xvJf faktor-[version].[arch].[os].tar.xz
  1. git clone到本地, 编译打包

    获取打包后的二进制文件faktor.bin

$ ./build.sh

查看帮助

$ ./faktor.bin --help
########    ###    ##    ## ########  #######  ########
##         ## ##   ##   ##     ##    ##     ## ##     ##
##        ##   ##  ##  ##      ##    ##     ## ##     ##
######   ##     ## #####       ##    ##     ## ########
##       ######### ##  ##      ##    ##     ## ##   ##
##       ##     ## ##   ##     ##    ##     ## ##    ##
##       ##     ## ##    ##    ##     #######  ##     ##

fake mysql server

Usage:
  faktor [flags]

Commands:
  load, create  load a schema [ with init sql script ]
  unload, drop  unload a schema
  help          use 'help [command]' for command help

Flags:
  -p, --port     int       mysql server port (default: 9900)
  -u, --username string    mysql user name (default: auser)
  -w, --password string    mysql password (default: sa)
      --log      string    fake database log output (default: faktor.db.log)
      --nocolor            disable color output
  -h, --help               display help

启动

启动伪数据库服务后, 进入命令行模式

$ ./faktor.bin
########    ###    ##    ## ########  #######  ########  
##         ## ##   ##   ##     ##    ##     ## ##     ##
##        ##   ##  ##  ##      ##    ##     ## ##     ##
######   ##     ## #####       ##    ##     ## ########  
##       ######### ##  ##      ##    ##     ## ##   ##   
##       ##     ## ##   ##     ##    ##     ## ##    ##  
##       ##     ## ##    ##    ##     #######  ##     ##

faktor »  

查看命令行帮助

faktor » help
########    ###    ##    ## ########  #######  ########  
##         ## ##   ##   ##     ##    ##     ## ##     ##
##        ##   ##  ##  ##      ##    ##     ## ##     ##
######   ##     ## #####       ##    ##     ## ########  
##       ######### ##  ##      ##    ##     ## ##   ##   
##       ##     ## ##   ##     ##    ##     ## ##    ##  
##       ##     ## ##    ##    ##     #######  ##     ##


fake mysql server

Commands:
  clear         clear the screen
  exit          exit the shell
  help          use 'help [command]' for command help
  load, create  load a schema [ with init sql script ]
  unload, drop  unload a schema
faktor » help load

load a schema [ with init sql script ]

Usage:
  load [flags] schema [script]

Args:
  schema  string    schema name
  script  string    schema init script

Flags:
  -h, --help     display help
faktor » help unload

unload a schema

Usage:
  unload [flags] schema

Args:
  schema  string    schema name

Flags:
  -h, --help     display help

加载数据库

faktor » load [schema name] [init sql script file path, optional]

卸载数据库

faktor » unload [schema name]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Types

This section is empty.

Directories

Path Synopsis
cmd
all command

Jump to

Keyboard shortcuts

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