pgsql 1.0 → 1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/lib/conn_exec.c +29 -1
- data/lib/module.c +1 -1
- metadata +6 -10
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YWY3ODAyYTYzODU1N2FlMWY0Yjc5ZWI4MjI2YjRkZmMyMzYxZmU0Yw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NzY1ODM3ZTQ0Zjc4NzJjYTZiZjNkOGNkYTI1ZTBkYWMzY2M0NjdiOA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MmI2NzZmODRhMjVkMmM2OGQ0ODg0NDZmZGYzZGI0NzY2YTM0YzU0MzVjNmVm
|
10
|
+
NmE0NmEzOWM4Njk3NjkxZTVjZmU0YmQzNDQ4NDY1ZjRmYjg5MzIzNTBjYTM0
|
11
|
+
YWNiMjgyYmMyYjRkMWM5MTEyNTRmYWVkYzQ1Mzg4ZjNkZDdiYjE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YTNkM2RiNjc3ZTcyMWIyYmVkNTE0NDRmODIyYzc4ZmRiMjQ3NTc0MmIxNzYw
|
14
|
+
ZGVjMmNiMWMxNDA5MmMxMjkxNTcyNzQyNTljNGUyZTRkYjIzMDVlZTFkYjQy
|
15
|
+
NDEyZTQ5MzA5NDU0NmE2YWRiODYyMTgwMDJmMDM3MDRkN2U1NDA=
|
data/lib/conn_exec.c
CHANGED
@@ -53,6 +53,8 @@ static VALUE get_end( VALUE conn);
|
|
53
53
|
static VALUE pgconn_getline( int argc, VALUE *argv, VALUE self);
|
54
54
|
static VALUE pgconn_each_line( VALUE self);
|
55
55
|
|
56
|
+
static VALUE pgconn_backup( VALUE self, VALUE label);
|
57
|
+
static VALUE backup_end( VALUE conn);
|
56
58
|
|
57
59
|
|
58
60
|
static VALUE rb_ePgConnExec;
|
@@ -789,9 +791,34 @@ pgconn_each_line( VALUE self)
|
|
789
791
|
|
790
792
|
|
791
793
|
|
794
|
+
/*
|
795
|
+
* call-seq:
|
796
|
+
* conn.backup( label) { |result| ... } -> nil
|
797
|
+
*
|
798
|
+
* Call the pg_start_backup() and pg_stop_backup() functions.
|
799
|
+
*/
|
800
|
+
VALUE
|
801
|
+
pgconn_backup( VALUE self, VALUE label)
|
802
|
+
{
|
803
|
+
VALUE cmd, arg;
|
792
804
|
|
805
|
+
cmd = rb_str_new2( "select pg_start_backup($1);");
|
806
|
+
arg = rb_ary_new3( 1, label);
|
807
|
+
pgresult_clear( pg_statement_exec( self, cmd, arg));
|
808
|
+
return rb_ensure( rb_yield, Qnil, backup_end, self);
|
809
|
+
}
|
793
810
|
|
794
811
|
|
812
|
+
VALUE
|
813
|
+
backup_end( VALUE self)
|
814
|
+
{
|
815
|
+
VALUE cmd;
|
816
|
+
|
817
|
+
cmd = rb_str_new2( "select pg_stop_backup();");
|
818
|
+
pgresult_clear( pg_statement_exec( self, cmd, Qnil));
|
819
|
+
return Qnil;
|
820
|
+
}
|
821
|
+
|
795
822
|
|
796
823
|
|
797
824
|
/********************************************************************
|
@@ -841,7 +868,6 @@ Init_pgsql_conn_exec( void)
|
|
841
868
|
rb_define_method( rb_cPgConn, "get_notify", &pgconn_get_notify, 0);
|
842
869
|
|
843
870
|
|
844
|
-
|
845
871
|
#define TRANS_DEF( c) rb_define_const( rb_cPgConn, "T_" #c, INT2FIX( PQTRANS_ ## c))
|
846
872
|
TRANS_DEF( IDLE);
|
847
873
|
TRANS_DEF( ACTIVE);
|
@@ -864,6 +890,8 @@ Init_pgsql_conn_exec( void)
|
|
864
890
|
rb_define_alias( rb_cPgConn, "get", "getline");
|
865
891
|
rb_define_method( rb_cPgConn, "each_line", &pgconn_each_line, 0);
|
866
892
|
|
893
|
+
rb_define_method( rb_cPgConn, "backup", &pgconn_backup, 1);
|
894
|
+
|
867
895
|
ID id_to_a = 0;
|
868
896
|
}
|
869
897
|
|
data/lib/module.c
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pgsql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
5
|
-
prerelease:
|
4
|
+
version: '1.1'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Bertram Scharpf
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-10-05 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: autorake
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -58,8 +55,9 @@ files:
|
|
58
55
|
- lib/result.c
|
59
56
|
- README
|
60
57
|
- LICENSE
|
61
|
-
homepage: http://www.bertram-scharpf.de
|
58
|
+
homepage: http://www.bertram-scharpf.de/software/pgsql
|
62
59
|
licenses: []
|
60
|
+
metadata: {}
|
63
61
|
post_install_message:
|
64
62
|
rdoc_options:
|
65
63
|
- --charset
|
@@ -69,13 +67,11 @@ rdoc_options:
|
|
69
67
|
require_paths:
|
70
68
|
- lib
|
71
69
|
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
70
|
requirements:
|
74
71
|
- - ! '>='
|
75
72
|
- !ruby/object:Gem::Version
|
76
73
|
version: '0'
|
77
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
-
none: false
|
79
75
|
requirements:
|
80
76
|
- - ! '>='
|
81
77
|
- !ruby/object:Gem::Version
|
@@ -83,8 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
79
|
requirements:
|
84
80
|
- PostgreSQL
|
85
81
|
rubyforge_project: NONE
|
86
|
-
rubygems_version:
|
82
|
+
rubygems_version: 2.0.7
|
87
83
|
signing_key:
|
88
|
-
specification_version:
|
84
|
+
specification_version: 4
|
89
85
|
summary: PostgreSQL-API for Ruby
|
90
86
|
test_files: []
|