Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Bigtop::Backend::SQL::UserLContributed Perl DocuBigtop::Backend::SQL::MySQL(3)

NAME
       Bigtop::Backend::SQL::MySQL - backend to	generate sql for MySQL
       database	creation

SYNOPSIS
       If your bigtop file looks like this:

	   config {
	       SQL  MySQL {}
	   }
	   app App::Name {
	   }

       and there are table and/or sequence blocks in the app block, this
       module will make	docs/schema.mysql (relative to the build_dir) when you
       type:

	   bigtop app.bigtop SQL

       or

	   bigtop app.bigtop all

       You can feed that file directly to psql,	once you have created a
       database.  That is type:

	   mysql -u user -p
	   > create database dbnmae;
	   >
	   quit
	   mysql -u user -p dbname < docs/schema.mysql

DESCRIPTION
       This is a Bigtop	backend	which generates	SQL MySQL can understand.

KEYWORDS
       This module defines no keywords.	 Look in Bigtop::SQL for a list	of the
       keywords	you can	use in table and sequence blocks.

       Note that MySQL does not	support	sequences.  Trying to use them with
       this backend will be fatal.

SHORTHAND for is arguments
       This module does	provide	a couple of bits of shorthand (some aren't so
       short) for the arguments	of the is field	statement.

	   field id {
	       is int4,	primary_key, auto;
	   }

       This translates into:

	   id MEDIUMINT	PRIMARY	KEY AUTO_INCREMENT

       You can also type 'assign_by_sequence' instead of 'auto'.  That might
       aid understanding, if you can type it correctly.

       Note that using 'primary_key' instead of	the literal 'PRIMARY KEY' is
       important.  It tells the	SQL and	the Model back ends that this is the
       primary key.

METHODS
       To keep podcoverage tests happy.

       backend_block_keywords
	   Tells tentmaker that	I understand these config section backend
	   block keywords:

	       no_gen
	       template

       what_do_you_make
	   Tells tentmaker what	this module makes.  Summary:
	   docs/schema.sqlite.

       gen_SQL
	   Called by Bigtop::Parser to get me to do my thing.

       setup_template
	   Called by Bigtop::Parser so the user	can substitute an alternate
	   template for	the hard coded one here.

AUTHOR
       Phil Crow <crow.phil@gmail.com>

COPYRIGHT and LICENSE
       Copyright (C) 2005 by Phil Crow

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself, either Perl	version	5.8.6 or, at
       your option, any	later version of Perl 5	you may	have available.

perl v5.32.0			  2020-08-29	Bigtop::Backend::SQL::MySQL(3)

NAME | SYNOPSIS | DESCRIPTION | KEYWORDS | SHORTHAND for is arguments | METHODS | AUTHOR | COPYRIGHT and LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Bigtop::Backend::SQL::MySQL&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help