您当前的位置:首页 > 计算机 > 软件应用 > 数据库 > PostgreSQL

PostgreSQL Converse 将数据库表直接生成 java bean 和 HTML From

时间:12-14来源:作者:点击数:
CDSY,CDSY.XYZ
Create Java Entity Bean (not EJB CMP)  相关文件下载:1205.zip
  pgsql.py  
功能简介:pgsql.py 是一个将数据库表直接生成 java bean 和 HTML From 的软件,使用方法运行 pysql.py 然后输入表名即可
Sample:
  Users.java Users.html
  Groups.java Groups.html
  System_log.java System_log.html
  Company.java Company.html
  Person.java Person.html
  mail2pgsql.py 未完成

功能:实现一个 SMTP Server 将邮件投递到 PostgreSQL 数据库中, 只要稍加改动就可以实现 mail2sms,mail2xxx

  socket-file.log  

软件使用方法

[root@linux tmp]# ./pgsql.py
Please enter a table: system_log
[root@linux tmp]#

查看生成的 Java Bean

[root@linux tmp]# ls
Groups.java  Oa.meeting.java  pgsql.py  Role.java  System_log.java  Users.java  workfile.java
[root@linux tmp]# cat System_log.java |more
package netkiller.ebusiness;

import java.sql.*;
import java.util.*;
import netkiller.database.*;
import netkiller.security.*;
public class System_log{

    private String status = null;
    private String description = null;
    private String ip = null;
    private String oid = null;
    private String login_date = null;
    private String id = null;
    private String uid = null;

    public System_log(){
    }

    public void setStatus(String value){
        this.status = value;
    }
    public String getStatus(){
        return this.status;
    }
    public void setDescription(String value){
        this.description = value;
    }
    public String getDescription(){
        return this.description;
    }
    public void setIp(String value){
        this.ip = value;
    }
    public String getIp(){
        return this.ip;
    }
    public void setOid(String value){
        this.oid = value;
    }
    public String getOid(){
        return this.oid;
--More--

配置方法

import pg
import string
db = pg.DB(dbname='netkiller', host='127.0.0.1', user='netkiller',passwd='chen')
CDSY,CDSY.XYZ
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门
本栏推荐