Skip to content

Commit add1267

Browse files
Add files via upload
1 parent f47afbe commit add1267

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+12046
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
program Meta_Indices;
2+
3+
uses
4+
Forms,
5+
fMetaIndices in 'fMetaIndices.pas' {frmMetaIndices},
6+
ADONetUtils in '..\..\..\Utils\ADONetUtils.pas',
7+
fSQLiteMainCompBase in '..\..\fSQLiteMainCompBase.pas' {frmSQLiteMainCompBase};
8+
9+
{$R *.res}
10+
11+
begin
12+
Application.Initialize;
13+
Application.MainFormOnTaskbar := True;
14+
Application.CreateForm(TfrmMetaIndices, frmMetaIndices);
15+
Application.CreateForm(TfrmSQLiteMainCompBase, frmSQLiteMainCompBase);
16+
Application.Run;
17+
end.

‎Demos/SQLite/MetaInfo/Indices/Meta_Indices.dproj

Lines changed: 562 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
inherited frmMetaIndices: TfrmMetaIndices
2+
Caption = 'Meta info about indices'
3+
ExplicitWidth = 602
4+
ExplicitHeight = 598
5+
PixelsPerInch = 96
6+
TextHeight = 13
7+
inherited pnlTitle: TPanel
8+
inherited lblTitle: TLabel
9+
Width = 244
10+
Caption = 'Meta info about indices'
11+
ExplicitWidth = 244
12+
end
13+
end
14+
inherited pnlMain: TPanel
15+
inherited pnl1: TPanel
16+
object pnl2: TPanel
17+
Left = 0
18+
Top = 4
19+
Width = 586
20+
Height = 378
21+
Align = alClient
22+
BevelOuter = bvNone
23+
TabOrder = 0
24+
ExplicitTop = 7
25+
ExplicitHeight = 375
26+
object pnlConnection: TPanel
27+
Left = 0
28+
Top = 0
29+
Width = 586
30+
Height = 129
31+
Align = alTop
32+
BevelOuter = bvNone
33+
TabOrder = 0
34+
object lbl4: TLabel
35+
Left = 207
36+
Top = 24
37+
Width = 30
38+
Height = 13
39+
Caption = 'Table:'
40+
end
41+
object btnFetch: TButton
42+
Left = 6
43+
Top = 52
44+
Width = 76
45+
Height = 25
46+
Cursor = crHandPoint
47+
Caption = 'Fetch'
48+
Enabled = False
49+
TabOrder = 2
50+
OnClick = btnFetchClick
51+
end
52+
object rgMain: TRadioGroup
53+
Left = 6
54+
Top = 12
55+
Width = 190
56+
Height = 37
57+
Cursor = crHandPoint
58+
Columns = 2
59+
ItemIndex = 0
60+
Items.Strings = (
61+
'mkIndexes'
62+
'mkIndexFields')
63+
TabOrder = 0
64+
OnClick = rgMainClick
65+
end
66+
object lbledtIndexName: TLabeledEdit
67+
Left = 407
68+
Top = 21
69+
Width = 121
70+
Height = 21
71+
EditLabel.Width = 32
72+
EditLabel.Height = 13
73+
EditLabel.Caption = 'Index:'
74+
Enabled = False
75+
LabelPosition = lpLeft
76+
TabOrder = 1
77+
end
78+
object mmoInfo: TMemo
79+
Left = 6
80+
Top = 84
81+
Width = 612
82+
Height = 39
83+
Color = clInfoBk
84+
Lines.Strings = (
85+
86+
'To fetch meta information click Fetch button. Use the radio butt' +
87+
'ons group to select the kind of meta info to fetch.')
88+
TabOrder = 3
89+
end
90+
object cbTableNames: TComboBox
91+
Left = 241
92+
Top = 21
93+
Width = 127
94+
Height = 21
95+
TabOrder = 4
96+
end
97+
end
98+
object mmoConsole: TMemo
99+
Left = 0
100+
Top = 129
101+
Width = 586
102+
Height = 249
103+
Align = alClient
104+
Font.Charset = DEFAULT_CHARSET
105+
Font.Color = clWindowText
106+
Font.Height = -13
107+
Font.Name = 'Courier New'
108+
Font.Style = []
109+
ParentFont = False
110+
ScrollBars = ssBoth
111+
TabOrder = 1
112+
ExplicitHeight = 246
113+
end
114+
end
115+
end
116+
end
117+
end
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
unit fMetaIndices;
2+
3+
interface
4+
5+
uses
6+
Windows, Messages, SysUtils, Variants, Classes, Graphics,
7+
Controls, Forms, Dialogs, fSQLiteMainCompBase, CNClrLib.ADONet.Enums,
8+
CNClrLib.ADONet.Error, CNClrLib.ADONet.EventArgs,
9+
CNClrLib.ADONet.SQLiteEventArgs, StdCtrls, ExtCtrls, DB,
10+
CNClrLib.ADONet.Client, CNClrLib.ADONet.SQLite, Buttons;
11+
12+
type
13+
TfrmMetaIndices = class(TfrmSQLiteMainCompBase)
14+
pnl2: TPanel;
15+
pnlConnection: TPanel;
16+
btnFetch: TButton;
17+
rgMain: TRadioGroup;
18+
lbledtIndexName: TLabeledEdit;
19+
mmoInfo: TMemo;
20+
mmoConsole: TMemo;
21+
cbTableNames: TComboBox;
22+
lbl4: TLabel;
23+
procedure btnConnectClick(Sender: TObject);
24+
procedure btnFetchClick(Sender: TObject);
25+
procedure rgMainClick(Sender: TObject);
26+
private
27+
{ Private declarations }
28+
public
29+
{ Public declarations }
30+
end;
31+
32+
var
33+
frmMetaIndices: TfrmMetaIndices;
34+
35+
implementation
36+
37+
{$R *.dfm}
38+
39+
procedure TfrmMetaIndices.btnConnectClick(Sender: TObject);
40+
begin
41+
btnFetch.Enabled := False;
42+
inherited;
43+
SqliteConnection1.GetTableNames(cbTableNames.Items);
44+
btnFetch.Enabled := True;
45+
end;
46+
47+
procedure TfrmMetaIndices.btnFetchClick(Sender: TObject);
48+
begin
49+
if rgMain.ItemIndex = 0 then
50+
SqliteConnection1.GetIndexes(cbTableNames.Text, mmoConsole.Lines)
51+
else
52+
SqliteConnection1.GetIndexFieldNames(cbTableNames.Text, lbledtIndexName.Text, mmoConsole.Lines);
53+
54+
mmoConsole.Lines.Insert(0, 'Meta info about indices');
55+
mmoConsole.Lines.Insert(1, '');
56+
end;
57+
58+
procedure TfrmMetaIndices.rgMainClick(Sender: TObject);
59+
begin
60+
if rgMain.ItemIndex = 0 then
61+
lbledtIndexName.Enabled := False
62+
else
63+
lbledtIndexName.Enabled := True;
64+
end;
65+
66+
end.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
program Meta_Tables;
2+
3+
uses
4+
Forms,
5+
fMetaTables in 'fMetaTables.pas' {frmMetaTables},
6+
ADONetUtils in '..\..\..\Utils\ADONetUtils.pas',
7+
fSQLiteMainCompBase in '..\..\fSQLiteMainCompBase.pas' {frmSQLiteMainCompBase};
8+
9+
{$R *.res}
10+
11+
begin
12+
Application.Initialize;
13+
Application.MainFormOnTaskbar := True;
14+
Application.CreateForm(TfrmMetaTables, frmMetaTables);
15+
Application.CreateForm(TfrmSQLiteMainCompBase, frmSQLiteMainCompBase);
16+
Application.Run;
17+
end.

0 commit comments

Comments
 (0)