Re: [gnome-db] Create SQLite db
Corentin Noël <[email protected]> Tue, 12 Sep 2017 14:46:20 +0200
| Newsgroups | gmane.comp.gnome.db |
|---|---|
| Message-ID | <CAAspeLA+99Nig4DSgpwx5NaRZorSng+nqbxHEE+VbL0WoviAqQ@mail.gmail.com> |
--===============4782287036600521430== Content-Type: multipart/alternative; boundary="001a114aed6825239f0558fd6ec8" --001a114aed6825239f0558fd6ec8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Pavlo, In elementary's music application, we are using gda_connection_new_from_string https://github.com/elementary/music/blob/master/src/LocalBackend/LocalLibra= ry.vala#L140 You also have a few examples in the source tree https://github.com/GNOME/libgda/tree/master/examples Regards, Corentin No=C3=ABl, elementary developer 2017-09-11 21:04 GMT+02:00 Pavlo Solntsev <[email protected]>: > Hi, > I am trying to create SQLIte DB. I used gda_server_operation_ > prepare_create_database > (const gchar *provider, > const gchar *db_name, > GError **error); > to obtain a GdaServerOperation object. provider =3D "SQLite" > > The returned pointer was checked for NULL. > > Then, I used gda_server_operation_perform_create_database to create DB. > This function returns TRUE but I don't DB file. I was thinking, maybe > format of db_name may somehow affect this? For now, I used the full path = in > UNIX notation with .db suffix, just a DB name with .db suffix. In all > cases function returns TRUE but I don't see any DB file. Could you pleas= e > clarify what would be correct use of GdaServerOperation functions to crea= te > DB? Thanks. > > > > -Pavlo Solntsev > ------------------------------------------------------------ > --------------------------------- > > *Please avoid sending me Word or PowerPoint attachments.See > http://www.gnu.org/philosophy/no-word-attachments.html > <http://www.gnu.org/philosophy/no-word-attachments.html>* > > _______________________________________________ > gnome-db-list mailing list > [email protected] > https://mail.gnome.org/mailman/listinfo/gnome-db-list > > --001a114aed6825239f0558fd6ec8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div><div><div>Hi Pavlo,<br></div>In elementary's= music application, we are using gda_connection_new_from_string<br><a href= =3D"https://github.com/elementary/music/blob/master/src/LocalBackend/LocalL= ibrary.vala#L140">https://github.com/elementary/music/blob/master/src/Local= Backend/LocalLibrary.vala#L140</a><br></div>You also have a few examples in= the source tree <a href=3D"https://github.com/GNOME/libgda/tree/master/exa= mples">https://github.com/GNOME/libgda/tree/master/examples</a><br><br></di= v>Regards,<br></div>Corentin No=C3=ABl, elementary developer<br></div><div = class=3D"gmail_extra"><br><div class=3D"gmail_quote">2017-09-11 21:04 GMT+0= 2:00 Pavlo Solntsev <span dir=3D"ltr"><<a href=3D"mailto:pavlo.solntsev@= gmail.com" target=3D"_blank">[email protected]</a>></span>:<br><b= lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px = #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Hi,</div><div>I am tryin= g to create SQLIte=C2=A0DB. I used=C2=A0gda_server_operation_<wbr>prepare_c= reate_database</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(const gchar = *provider,</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 const gchar *db= _name,</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 GError **error);=C2= =A0</div><div>to obtain a=C2=A0GdaServerOperation object. provider =3D &quo= t;SQLite"</div><div><br></div><div>=C2=A0The returned pointer was chec= ked for NULL.</div><div><br></div><div>Then, I used=C2=A0gda_server_operati= on_<wbr>perform_create_database to create DB. This function returns TRUE bu= t I don't DB file. I was thinking, maybe format of db_name may somehow = affect this? For now, I used the full path in UNIX notation with .db=C2=A0s= uffix, just a DB name with .db suffix. In all =C2=A0cases function returns = TRUE but I don't see any DB file. Could you please clarify what would b= e correct use of GdaServerOperation functions to create DB? Thanks.</div><s= pan class=3D"HOEnZb"><font color=3D"#888888"><div><br></div><div><br></div>= <br clear=3D"all"><div><div class=3D"m_7038701375511349783gmail_signature">= <div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr">-Pavlo Solntse= v</div><div dir=3D"ltr">------------------------------<wbr>----------------= --------------<wbr>------------------------------<wbr>---</div></div><div d= ir=3D"ltr"><em style=3D"color:rgb(0,0,0);font-family:"Times New Roman&= quot;;font-size:16px">Please avoid sending me Word or PowerPoint attachment= s.<br>See <a href=3D"http://www.gnu.org/philosophy/no-word-attachments.html= " target=3D"_blank">http://www.gnu.org/philosophy/<wbr>no-word-attachments.= html</a></em><br></div></div></div></div></div></div> </font></span></div> <br>______________________________<wbr>_________________<br> gnome-db-list mailing list<br> <a href=3D"mailto:[email protected]">[email protected]</a><br> <a href=3D"https://mail.gnome.org/mailman/listinfo/gnome-db-list" rel=3D"no= referrer" target=3D"_blank">https://mail.gnome.org/<wbr>mailman/listinfo/gn= ome-db-list</a><br> <br></blockquote></div><br></div> --001a114aed6825239f0558fd6ec8-- --===============4782287036600521430== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gnome-db-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gnome-db-list --===============4782287036600521430==--