Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

class::dbi::test::sqlite(3pm) [debian man page]

Class::DBI::Test::SQLite(3pm)				User Contributed Perl Documentation			     Class::DBI::Test::SQLite(3pm)

NAME
Class::DBI::Test::SQLite - Base class for Class::DBI tests SYNOPSIS
use base 'Class::DBI::Test::SQLite'; __PACKAGE__->set_table('test'); __PACKAGE__->columns(All => qw/id name film salary/); sub create_sql { return q{ id INTEGER PRIMARY KEY, name CHAR(40), film VARCHAR(255), salary INT } } DESCRIPTION
This provides a simple base class for Class::DBI tests using SQLite. Each class for the test should inherit from this, provide a create_sql() method which returns a string representing the SQL used to create the table for the class, and then call set_table() to create the table, and tie it to the class. METHODS
set_table __PACKAGE__->set_table('test'); This combines creating the table with the normal Class::DBI table() call. create_sql (abstract) sub create_sql { return q{ id INTEGER PRIMARY KEY, name CHAR(40), film VARCHAR(255), salary INT } } This should return, as a text string, the schema for the table represented by this class. perl v5.12.4 2005-05-24 Class::DBI::Test::SQLite(3pm)

Check Out this Related Man Page

Jifty::DBI::Handle::SQLite(3pm) 			User Contributed Perl Documentation			   Jifty::DBI::Handle::SQLite(3pm)

NAME
Jifty::DBI::Handle::SQLite -- A SQLite specific Handle object SYNOPSIS
DESCRIPTION
This module provides a subclass of Jifty::DBI::Handle that compensates for some of the idiosyncrasies of SQLite. METHODS
database_version Returns the version of the SQLite library which is used, e.g., "2.8.0". SQLite can only return short variant. insert Takes a table name as the first argument and assumes that the rest of the arguments are an array of key-value pairs to be inserted. If the insert succeeds, returns the id of the insert, otherwise, returns a Class::ReturnValue object with the error reported. case_sensitive Returns 1, since SQLite's searches are case sensitive by default. Note, however, SQLite's "like" operator is case insensitive. distinct_count STATEMENTREF takes an incomplete SQL SELECT statement and massages it to return a DISTINCT result count rename_column ( table => $table, column => $old_column, to => $new_column ) rename column AUTHOR
Jesse Vincent, jesse@fsck.com SEE ALSO
perl(1), Jifty::DBI perl v5.14.2 2010-09-21 Jifty::DBI::Handle::SQLite(3pm)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Mysql CHAR vs VARCHAR

Looking for any advise from a DBA/DA. When should you use CHAR and when should you use VARCHAR when designing a table. From my readings seems like VARCHAR will accept any length string even though you define a length to it, so I setup gadget VARCHAR(10) I could actually put something with 20... (1 Reply)
Discussion started by: benefactr
1 Replies

2. Shell Programming and Scripting

Help in Perl

could you please help : i have written script to search the for PRIMARY INDEX and if found display the whole definition of create table: ISSUE NOW IS: to store the table name in a variable and search the file if and update and show table exists.. Example: ct t15( c1... (3 Replies)
Discussion started by: a.suryakumar
3 Replies

3. Shell Programming and Scripting

Perl - SQLite question

Hello All, I am trying to write a Perl script that is using 'SQLite' as the application needs a very light weight Database. I wanted to know how to catch exceptions when I run queries in SQLite. Without this the Perl script comes to a halt everytime an exception occurs. Please help. Regards,... (4 Replies)
Discussion started by: garric
4 Replies

4. Shell Programming and Scripting

deleteing

Dear Experts , I have 15 files and each files contains the data as mentioned below fileA name company salary job location nationality 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123... (4 Replies)
Discussion started by: shary
4 Replies

5. Shell Programming and Scripting

problem

write a shell script that computes the gross salary of a employee accordin to the followin rules: 1)if basic salary is<1500 then HRA=10%of the basic and DA=90% of the basic. 2)if basic salary is >=1500 then HRA=rs500 and DA=98% of the basic the basic salary is entered interactively through the... (1 Reply)
Discussion started by: shawz
1 Replies

6. Shell Programming and Scripting

Export into a single cell of excel sheet...

The awk is giving below output: SELECT divrel.child_org_idn org_main_idn NULL ( VARCHAR(200)) div_nam_2 NULL ( VARCHAR(200)) div_nam_3 NULL ( VARCHAR(200)) div_nam_4 NULL ( VARCHAR(200)) div_nam_5 NULL ( VARCHAR(200)) div_nam_6 NULL ( VARCHAR(200)) div_nam_7 ... (2 Replies)
Discussion started by: goutam_igate
2 Replies

7. Shell Programming and Scripting

Changing the text file format

Hi, I have a shell script to unload all the empname who have salary >50000 from the emp table into a text file(empname.txt) . m_db unload "$dbc_file" -column_delimiter ',' -select "SELECT empname FROM emp where salary > 50000" >> empname.txt Now my text file have data in the following format ... (3 Replies)
Discussion started by: kavithakuttyk
3 Replies

8. Shell Programming and Scripting

Bash Shell script--need help

Hi all, i am beginner to unix and trying out a shell script which does the following. i have to calculate a persons salary. his salary is read from the keyboard. he has two types of deductions. 40% as dearness allowance and 20% as house rent. i have to print the gross salary. here is the code... (5 Replies)
Discussion started by: Irishboy24
5 Replies

9. Web Development

SQL - Distinct plus more

Hi all, I have an interesting and I am sure simple question for yau'll. Basically this is what I am after: The table: CREATE TABLE places (id INT, city VARCHAR(24), name VARCHAR(24)); The data: id = 1, city = canberra, name = aaron id = 2, city = canberra, name = andrew id = 3, city... (4 Replies)
Discussion started by: STOIE
4 Replies

10. Shell Programming and Scripting

last task for my script

hi, infile- create table salary ( occupation_code char(40), earnings decimal(10,2), occ_yearend integer ); outfile- salary:create table salary salary:( occupation_code char(40), salary: earnings decimal(10,2), salary: occ_yearend integer salary:); Thanks. (4 Replies)
Discussion started by: dvah
4 Replies

11. Shell Programming and Scripting

AWK: how to get average based on certain column

Hi, I'm new to shell programming, can anyone help me on this? I want to do following operations - 1. Average salary for each country 2. Total salary for each city and data that looks like - salary country city 10000 zzz BN 25000 zzz BN 30000 zzz BN 10000 yyy ZN 15000 yyy ZN ... (3 Replies)
Discussion started by: shell123
3 Replies

12. Shell Programming and Scripting

Help me in awk with getline...Am new to the awk please..

Hello, Am using a script that will give output like below. emp = WH.3060 salary = 5 emp = WH.7235 salary = 5 emp = WH.6345 salary = 6 emp = WH.0234 salary = 5 emp = WH.5644 ... (3 Replies)
Discussion started by: prince1987
3 Replies

13. Shell Programming and Scripting

Max value Record from a File

I have a file with 3 columns I want to get the record with the max salary. If there are more than 1 record having the highest salary, i want any one of them. empid,ename,Sal 1,abc,100 2,def,200 3,xyz,300 4,pqr,100 5,mnq,300 Output Any record with 300 as salary Please use next... (1 Reply)
Discussion started by: traininfa
1 Replies

14. UNIX for Dummies Questions & Answers

between command?

my file contains salary field and i just want to find a salary between 50000 to 99999? Is there any command so that i can achieve this Please help (3 Replies)
Discussion started by: jainitai
3 Replies